1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

LibGUI: Remove UndoStack's automatic command combo'ing

UndoStack will now merge adjacent commands *if they want to be merged*
instead of bundling everything you push onto it until you tell it
to "finalize the combo."

This uses less memory and gives applications full control over how
their undo stacks end up. :^)
This commit is contained in:
Andreas Kling 2021-05-08 21:08:41 +02:00
parent 81bc861085
commit 161568103e
5 changed files with 37 additions and 77 deletions

View file

@ -48,7 +48,6 @@ void ImageEditor::did_complete_action()
{
if (!m_image)
return;
m_undo_stack->finalize_current_combo();
m_undo_stack->push(make<ImageUndoCommand>(*m_image));
}