void SetThresholdSymbol::executeRedo() { ThresholdLayer* pLayer = dynamic_cast<ThresholdLayer*>(getSessionItem()); if (pLayer != NULL) { pLayer->setSymbol(mNewSymbol); } }
void ThresholdLayerMemento::toLayer(Layer* pLayer) const { ThresholdLayer* pThresholdLayer = dynamic_cast<ThresholdLayer*>(pLayer); if (pThresholdLayer != NULL) { pThresholdLayer->setFirstThreshold(mLowerThreshold); pThresholdLayer->setSecondThreshold(mUpperThreshold); pThresholdLayer->setPassArea(mPassArea); pThresholdLayer->setRegionUnits(mUnits); pThresholdLayer->setColor(mColor); pThresholdLayer->setSymbol(mSymbol); } }