mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Added 'card' to value actions, this fixes a bug where extra fields get updated with the wrong context, and it should also speed things up.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@673 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -133,9 +133,14 @@ class ValueEditor {
|
||||
virtual ValueEditor* getEditor() { return this; } \
|
||||
virtual void redraw(); \
|
||||
private: \
|
||||
/** Retrieve the parent editor object */ \
|
||||
inline DataEditor& editor() const { \
|
||||
return static_cast<DataEditor&>(viewer); \
|
||||
} \
|
||||
/** Card this editor is on, or nullptr */ \
|
||||
inline const Card* card() const { return viewer.getCard().get(); } \
|
||||
/** Perform an action */ \
|
||||
void perform(Action* a) { getSet().actions.add(a); } \
|
||||
public:
|
||||
|
||||
#define IMPLEMENT_VALUE_EDITOR(Type) \
|
||||
|
||||
Reference in New Issue
Block a user