33 bool mergeWith(
const QUndoCommand *command )
override
35 if ( command->id() == 0 )
38 const QgsLayoutSerializableObjectUndoCommand *
c =
dynamic_cast<const QgsLayoutSerializableObjectUndoCommand *
>( command );
44 if ( mObject->stringType() !=
c->mObject->stringType() )
53 void saveState( QDomDocument &stateDoc )
const override
56 QDomElement documentElement = stateDoc.createElement( QStringLiteral(
"UndoState" ) );
58 stateDoc.appendChild( documentElement );
67 mObject->readXml( stateDoc.documentElement().firstChild().toElement(), stateDoc,
QgsReadWriteContext() );
68 mObject->layout()->project()->setDirty(
true );