mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Some more data types; dynamic arguments
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@5 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+2
-8
@@ -163,21 +163,15 @@ IMPLEMENT_REFLECTION(Symbol) {
|
||||
|
||||
SymbolView::SymbolView() {}
|
||||
|
||||
SymbolView::SymbolView(SymbolP symbol)
|
||||
: symbol(symbol)
|
||||
{
|
||||
if (symbol) symbol->actions.addListener(this);
|
||||
}
|
||||
|
||||
SymbolView::~SymbolView() {
|
||||
if (symbol) symbol->actions.removeListener(this);
|
||||
}
|
||||
|
||||
void SymbolView::setSymbol(SymbolP newSymbol) {
|
||||
void SymbolView::setSymbol(const SymbolP& newSymbol) {
|
||||
// no longer listening to old symbol
|
||||
if (symbol) symbol->actions.removeListener(this);
|
||||
symbol = newSymbol;
|
||||
// start listening to new symbol
|
||||
if (symbol) symbol->actions.addListener(this);
|
||||
onSymbolChange();
|
||||
onChangeSymbol();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user