FontEditor: Make undo/redo compatible with multi-glyph selections

Previously the glyph undo stack saved an array of bytes representing
the restore state of an individual glyph when modified. Now the
selection undo stack saves a byte buffer of the entire selection,
letting us restore changes to multiple glyphs at once.
This commit is contained in:
thankyouverycool 2022-03-17 08:56:02 -04:00 committed by Andreas Kling
commit a3956da6dc
Notes: sideshowbarker 2024-07-17 17:14:07 +09:00
5 changed files with 99 additions and 108 deletions

View file

@ -7,7 +7,7 @@
#pragma once
#include "UndoGlyph.h"
#include "UndoSelection.h"
#include <LibGUI/ActionGroup.h>
#include <LibGUI/FilteringProxyModel.h>
#include <LibGUI/GlyphMapWidget.h>
@ -77,7 +77,7 @@ private:
RefPtr<GUI::Action> m_undo_action;
RefPtr<GUI::Action> m_redo_action;
RefPtr<UndoGlyph> m_undo_glyph;
RefPtr<UndoSelection> m_undo_selection;
OwnPtr<GUI::UndoStack> m_undo_stack;
RefPtr<GUI::Action> m_go_to_glyph_action;