//------------------------------------------------------ void DrawSheet::_removeDrawOperation(DrawOperation* toRemove) { DrawBuffer* buf = getBufferForOperation(toRemove); if (buf) buf->removeDrawOperation(toRemove); mDrawOpMap.erase(toRemove->getID()); }
//------------------------------------------------------ void DrawSheet::_sourceChanged(DrawOperation* op, const DrawSourcePtr& oldsrc) { DrawSourceBase::ID oldID = oldsrc->getSourceID(); DrawSourceBase::ID newID = op->getDrawSourceBase()->getSourceID(); if (oldID != newID) { DrawBuffer* dbo = getBufferForSourceID(oldID); DrawBuffer* dbn = getBufferForSourceID(newID); // remove from the old buffer // add into the new one dbo->removeDrawOperation(op); dbn->addDrawOperation(op); } }