mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17: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:
parent
81bc861085
commit
161568103e
5 changed files with 37 additions and 77 deletions
|
@ -340,10 +340,9 @@ FontEditorWidget::FontEditorWidget(const String& path, RefPtr<Gfx::BitmapFont>&&
|
|||
did_modify_font();
|
||||
};
|
||||
|
||||
m_glyph_editor_widget->on_undo_event = [this](bool finalize) {
|
||||
m_glyph_editor_widget->on_undo_event = [this](bool) {
|
||||
// FIXME: UndoStack no longer has finalization concept, so this needs some fixing.
|
||||
m_undo_stack->push(make<GlyphUndoCommand>(*m_undo_glyph));
|
||||
if (finalize)
|
||||
m_undo_stack->finalize_current_combo();
|
||||
did_change_undo_stack();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue