The way actions are merged is dictated by the
merge_mode argument.
If
custom_context object is provided, it will be used for deducing target history (instead of using the first operation).
The way undo operation are ordered in actions is dictated by
backward_undo_ops. When
backward_undo_ops is
false undo option are ordered in the same order they were added. Which means the first operation to be added will be the first to be undone.
If
mark_unsaved is
false, the action will not mark the history as unsaved. This is useful for example for actions that change a selection, or a setting that will be saved automatically. Otherwise, this should be left to
true if the action requires saving by the user or if it can cause data loss when left unsaved.