mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-11-20 08:10:11 +00:00
17 lines
299 B
C++
17 lines
299 B
C++
#include "ModEditDialogCommon.h"
|
|
|
|
bool lastfirst (QModelIndexList & list, int & first, int & last)
|
|
{
|
|
if(!list.size())
|
|
return false;
|
|
first = last = list[0].row();
|
|
for(auto item: list)
|
|
{
|
|
int row = item.row();
|
|
if(row < first)
|
|
first = row;
|
|
if(row > last)
|
|
last = row;
|
|
}
|
|
return true;
|
|
} |