void DeleteQUndoCommand::undo() { // 1) (if TIG pointer set): take AO out of the TIG and create a new VI // 2) (if not set): re-use the AO (we should have kept the pointer alive) and create a new VI if(nullptr != theTIGPtr) { assert(nullptr == theAOPtr); theAOPtr = theTIGPtr->getAOfromToolbox(); updateAO(theOrigPos); theAOPtr->createViewItem(); } else assert(nullptr != theAOPtr); updateAO(theOrigPos); updateAO(theOrigWidth, theOrigHeight); World::getWorldPtr()->addObject(theAOPtr); updateVI(); AbstractQUndoCommand::undo(); }
double eResistor::current() { updateVI(); return m_current; }