Added new sort options for special rarity

Added "sort script" field
BUG: Dependencies are not correctly updated for collection sorting, so card numbers don't update properly.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@546 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-07-10 16:44:43 +00:00
parent fb428ee66e
commit fa21bee0b1
12 changed files with 92 additions and 50 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ bool CardListBase::compareItems(void* a, void* b) const {
ValueP va = reinterpret_cast<Card*>(a)->data[sort_field];
ValueP vb = reinterpret_cast<Card*>(b)->data[sort_field];
if (!va || !vb) return va < vb; // got to do something, compare pointers
return smart_less( va->toString() , vb->toString() );
return smart_less( va->getSortKey(), vb->getSortKey() );
}
void CardListBase::rebuild() {