MoveLayerCommand class
#include <Jazz2/Editor/Document/Commands.h>
Moves a layer to another position in the list of layers.
Only the order changes, so nothing has to be kept but the two positions. The ground lines follow their layers.
Base classes
- class EditCommand
- Undoable change of a level being edited.
Constructors, destructors, conversion operators
-
MoveLayerCommand(std::
int32_t from, std:: int32_t to, String name) - Creates a move of the layer
fromto the positionto.
Public functions
- void Do(LevelDocument& document, DocumentChanges& changes) override
- Applies the change to the document, again after it was undone.
- void Undo(LevelDocument& document, DocumentChanges& changes) override
- Reverts the change.
- auto GetName() const -> String override
- Returns the name shown in the history.
-
auto GetMemoryUsage() const -> std::
size_t override - Returns the memory the command takes.