1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:18:12 +00:00

FontEditor: Store glyph modified state on the undo stack

This means that if you modify a glyph, then undo that modification, we
stop showing the glyph as modified.
This commit is contained in:
Sam Atkins 2022-08-02 14:08:31 +01:00 committed by Sam Atkins
parent 014d825472
commit 7f6bf8c7c1
2 changed files with 16 additions and 3 deletions

View file

@ -547,7 +547,7 @@ ErrorOr<void> MainWidget::initialize(String const& path, RefPtr<Gfx::BitmapFont>
return {};
auto selection = m_glyph_map_widget->selection().normalized();
m_undo_selection = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) UndoSelection(selection.start(), selection.size(), m_glyph_map_widget->active_glyph(), *edited_font)));
m_undo_selection = TRY(try_make_ref_counted<UndoSelection>(selection.start(), selection.size(), m_glyph_map_widget->active_glyph(), *edited_font, *m_glyph_map_widget));
m_undo_stack->clear();
m_path = path;