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:
parent
67537bfc80
commit
928f16d360
5 changed files with 39 additions and 12 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue