mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -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:
@@ -98,5 +98,22 @@ class TextValue : public Value {
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : TextValue
|
||||
|
||||
/// A 'fake' TextValue that is used to edit some other string
|
||||
/** Used by TextCtrl */
|
||||
class FakeTextValue : public TextValue {
|
||||
public:
|
||||
inline FakeTextValue(const TextFieldP& field, String* underlying)
|
||||
: TextValue(field), underlying(underlying) {}
|
||||
|
||||
String* const underlying; ///< The underlying actual value
|
||||
|
||||
/// Update underlying data
|
||||
virtual void onAction(Action& a, bool undone);
|
||||
/// Editing the same underlying value?
|
||||
virtual bool equals(const Value* that);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user