Ejemplo n.º 1
0
	//------------------------------------------------------
	void DrawSheet::_removeDrawOperation(DrawOperation* toRemove) {
		DrawBuffer* buf = getBufferForOperation(toRemove);

		if (buf)
			buf->removeDrawOperation(toRemove);

		mDrawOpMap.erase(toRemove->getID());
	}
Ejemplo n.º 2
0
	//------------------------------------------------------
	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);
		}
	}