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
+4 -4
View File
@@ -229,7 +229,7 @@ void SetScriptManager::updateStyles(Context& ctx, const IndexMap<FieldP,StyleP>&
s->tellListeners(only_content_dependent);
}
} catch (const ScriptError& e) {
throw ScriptError(e.what() + _("\n while updating styles for '") + s->fieldP->name + _("'"));
handle_error(ScriptError(e.what() + _("\n while updating styles for '") + s->fieldP->name + _("'")));
}
}
}
@@ -267,7 +267,7 @@ void SetScriptManager::updateAll() {
try {
v->update(ctx);
} catch (const ScriptError& e) {
throw ScriptError(e.what() + _("\n while updating set value '") + v->fieldP->name + _("'"));
handle_error(ScriptError(e.what() + _("\n while updating set value '") + v->fieldP->name + _("'")));
}
}
// update card data of all cards
@@ -277,7 +277,7 @@ void SetScriptManager::updateAll() {
try {
v->update(ctx);
} catch (const ScriptError& e) {
throw ScriptError(e.what() + _("\n while updating card value '") + v->fieldP->name + _("'"));
handle_error(ScriptError(e.what() + _("\n while updating card value '") + v->fieldP->name + _("'")));
}
}
}
@@ -311,7 +311,7 @@ void SetScriptManager::updateToUpdate(const ToUpdate& u, deque<ToUpdate>& to_upd
try {
changes = u.value->update(ctx);
} catch (const ScriptError& e) {
throw ScriptError(e.what() + _("\n while updating value '") + u.value->fieldP->name + _("'"));
handle_error(ScriptError(e.what() + _("\n while updating value '") + u.value->fieldP->name + _("'")));
}
if (changes) {
// changed, send event