Added identifying field to set, show set name in window title.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@519 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-07 14:53:24 +00:00
parent cc27c3e4a0
commit 1646aebc88
5 changed files with 57 additions and 5 deletions
+16
View File
@@ -99,6 +99,22 @@ IndexMap<FieldP, ValueP>& Set::stylingDataFor(const CardP& card) {
else return stylingDataFor(stylesheetFor(card));
}
String Set::identification() const {
// an identifying field
FOR_EACH_CONST(v, data) {
if (v->fieldP->identifying) {
return v->toString();
}
}
// otherwise the first field
if (!data.empty()) {
return data.at(0)->toString();
} else {
return wxEmptyString;
}
}
String Set::typeName() const { return _("set"); }
// fix values for versions < 0.2.7