tweaks to compact reading with tag.isComplex(): no longer requires that many hacks

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1312 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2009-01-09 02:03:24 +00:00
parent 432cdcd583
commit 7d1bb77163
5 changed files with 18 additions and 18 deletions
+2 -12
View File
@@ -143,8 +143,8 @@ IMPLEMENT_REFLECTION_ENUM(ChoiceChoiceType) {
VALUE_N("radio", CHOICE_TYPE_RADIO);
}
IMPLEMENT_REFLECTION_NO_GET_MEMBER(ChoiceField::Choice) {
if (isGroup() || line_below || enabled.isScripted() || (tag.reading() && tag.isComplex())) {
IMPLEMENT_REFLECTION(ChoiceField::Choice) {
if (isGroup() || line_below || enabled.isScripted() || tag.isComplex()) {
// complex values are groups
REFLECT(name);
REFLECT_N("group_choice", default_name);
@@ -157,16 +157,6 @@ IMPLEMENT_REFLECTION_NO_GET_MEMBER(ChoiceField::Choice) {
}
}
template <> void GetDefaultMember::handle(const ChoiceField::Choice& c) {
if (!c.isGroup()) handle(c.name);
}
template <> void GetMember::handle(const ChoiceField::Choice& c) {
handle(_("name"), c.name);
handle(_("group choice"), c.default_name);
handle(_("choices"), c.choices);
}
// ----------------------------------------------------------------------------- : ChoiceStyle
ChoiceStyle::ChoiceStyle(const ChoiceFieldP& field)