1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 10:57:35 +00:00

LibGUI: Remember modified state on undo/redo actions

This commit is contained in:
Carlos César Neves Enumo 2021-05-05 14:09:43 -03:00 committed by Andreas Kling
parent 67537bfc80
commit 928f16d360
5 changed files with 39 additions and 12 deletions

View file

@ -299,7 +299,7 @@ MainWidget::MainWidget()
return;
}
editor().document().set_modified(false);
editor().document().set_unmodified();
// FIXME: It would be cool if this would propagate from GUI::TextDocument somehow.
window()->set_modified(false);
@ -312,7 +312,7 @@ MainWidget::MainWidget()
if (!m_editor->write_to_file(m_path)) {
GUI::MessageBox::show(window(), "Unable to save file.\n", "Error", GUI::MessageBox::Type::Error);
} else {
editor().document().set_modified(false);
editor().document().set_unmodified();
// FIXME: It would be cool if this would propagate from GUI::TextDocument somehow.
window()->set_modified(false);