|
Krita Source Code Documentation
|
#include <KisAsynchronouslyMergeableCommandInterface.h>
Inheritance diagram for KisAsynchronouslyMergeableCommandInterface:Public Member Functions | |
| virtual bool | canMergeWith (const KUndo2Command *command) const =0 |
| virtual | ~KisAsynchronouslyMergeableCommandInterface () |
A special base class for commands that should be able to merge (compress) when used inside KisProcessingApplicator (or anything else that uses KisSavedMacroCommand).
KisProcessingApplicator generates many commands, but undo stack wants only one command to represent user's action. That is why the action is wrapped into KisSavedMacroCommand. This macro command class has a special algorithm for merging an action consisting of multiple commands. This algorithm must know if all the commands of the macro can be merged before doing the actual merge. Using KUndo2Command::mergeWith() is not possible for this purpose, because it merges commands right away and one cannot undo that.
Definition at line 30 of file KisAsynchronouslyMergeableCommandInterface.h.
|
virtual |
Definition at line 10 of file KisAsynchronouslyMergeableCommandInterface.cpp.
|
pure virtual |
command can be merged with (*this) command using KUndo2Command::mergeWith() call.WARNING: if canMergeWith() returned true, then mergeWith() must also return true. Otherwise KisSavedMacroCommand will be able to enter inconsistent state and assert.
Implemented in KisNodeCompositeOpCommand, KisNodeOpacityCommand, KisNodePropertyListCommand, KisNodeRenameCommand, KisChangeProjectionColorCommand, KisImageAnimSettingCommand, DisableUIUpdatesCommand, UpdateCommand, and EmitImageSignalsCommand.