mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
(partially working) keyword list
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@230 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -93,7 +93,11 @@ struct ItemList::ItemComparer {
|
||||
ItemList& list; // 'this' pointer
|
||||
// Compare two items using the current criterium and order
|
||||
bool operator () (const VoidP& a, const VoidP& b) {
|
||||
return list.compareItems(a.get(), b.get());
|
||||
if (list.sort_ascending) {
|
||||
return list.compareItems(a.get(), b.get());
|
||||
} else {
|
||||
return list.compareItems(b.get(), a.get());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -124,7 +128,6 @@ void ItemList::sortBy(long column, bool ascending) {
|
||||
} else if (i == sort_by_column) {
|
||||
ClearColumnImage(i);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
// sort list
|
||||
sort_by_column = column;
|
||||
|
||||
Reference in New Issue
Block a user