mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Fixed Actions for TextCtrl, actions used to apply to the wrong value.
Changed some TABs to spaces in macros, that should end the conflicts because we use different tab sizes (4 vs 8) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@234 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -105,3 +105,18 @@ bool TextValue::update(Context& ctx) {
|
||||
IMPLEMENT_REFLECTION_NAMELESS(TextValue) {
|
||||
if (fieldP->save_value || tag.scripting()) REFLECT_NAMELESS(value);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : FakeTextValue
|
||||
|
||||
void FakeTextValue::onAction(Action& a, bool undone) {
|
||||
*underlying = value;
|
||||
}
|
||||
|
||||
bool FakeTextValue::equals(const Value* that) {
|
||||
if (this == that) return true;
|
||||
const FakeTextValue* thatT = dynamic_cast<const FakeTextValue*>(that);
|
||||
if (!thatT || underlying != thatT->underlying) return false;
|
||||
// update the value
|
||||
value = *underlying;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user