2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
|
|
|
|
#include "toonz/tfxhandle.h"
|
|
|
|
#include "tfx.h"
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
TFxHandle::TFxHandle() : m_fx(0), m_previousActionString() {}
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
TFxHandle::~TFxHandle() {
|
|
|
|
if (m_fx) m_fx->release();
|
|
|
|
m_fx = 0;
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
// do not switch fx settings when single-clicking the fx node in the schematic
|
2016-06-15 18:43:10 +12:00
|
|
|
void TFxHandle::setFx(TFx *fx, bool doSwitchFxSettings) {
|
|
|
|
if (m_fx == fx) return;
|
|
|
|
if (fx) fx->addRef();
|
|
|
|
if (m_fx) m_fx->release();
|
|
|
|
m_fx = fx;
|
|
|
|
emit fxSwitched();
|
|
|
|
if (doSwitchFxSettings) emit fxSettingsShouldBeSwitched();
|
2016-03-19 06:57:51 +13:00
|
|
|
}
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
void TFxHandle::onColumnChanged() {}
|