diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-28 04:38:29 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-28 04:38:29 +0200 |
commit | 5ff6fbf4648d286ff0f07a4dbf37c0b72651f66b (patch) | |
tree | 09f3f739d22370b8ce96144057d2cec2d74febb5 /gui/ModEditDialogCommon.cpp | |
parent | aa8766581ebad668194fcab87f53af4270e9679a (diff) | |
download | MultiMC-5ff6fbf4648d286ff0f07a4dbf37c0b72651f66b.tar MultiMC-5ff6fbf4648d286ff0f07a4dbf37c0b72651f66b.tar.gz MultiMC-5ff6fbf4648d286ff0f07a4dbf37c0b72651f66b.tar.lz MultiMC-5ff6fbf4648d286ff0f07a4dbf37c0b72651f66b.tar.xz MultiMC-5ff6fbf4648d286ff0f07a4dbf37c0b72651f66b.zip |
Basic 1.6 mod management (no jar mods)
Diffstat (limited to 'gui/ModEditDialogCommon.cpp')
-rw-r--r-- | gui/ModEditDialogCommon.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gui/ModEditDialogCommon.cpp b/gui/ModEditDialogCommon.cpp new file mode 100644 index 00000000..5da0a039 --- /dev/null +++ b/gui/ModEditDialogCommon.cpp @@ -0,0 +1,17 @@ +#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; +}
\ No newline at end of file |