mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user