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:
twanvl
2006-10-01 19:40:39 +00:00
parent 50b22e9478
commit 331423bd07
27 changed files with 431 additions and 95 deletions
+2 -8
View File
@@ -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();
}