diff options
author | Andreas Kling <kling@serenityos.org> | 2021-05-01 19:07:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-01 19:42:29 +0200 |
commit | a7fb50567beb56a9a2e689ed906abb76e9226421 (patch) | |
tree | bcdb94701418048c705d039c65b82041591c2848 /Userland/Applications/TextEditor | |
parent | f0cc712246c7c562f071fabf0f68c55b9fcff2b0 (diff) | |
download | serenity-a7fb50567beb56a9a2e689ed906abb76e9226421.zip |
TextEditor: Make sure to mark the Window as unmodified after saving
This comes with a FIXME, as it would be nicer if this information
would propagate from TextDocument all the way out somehow.
Diffstat (limited to 'Userland/Applications/TextEditor')
-rw-r--r-- | Userland/Applications/TextEditor/MainWidget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Applications/TextEditor/MainWidget.cpp b/Userland/Applications/TextEditor/MainWidget.cpp index 8c0c38a75d..267c10f133 100644 --- a/Userland/Applications/TextEditor/MainWidget.cpp +++ b/Userland/Applications/TextEditor/MainWidget.cpp @@ -300,6 +300,9 @@ MainWidget::MainWidget() } editor().document().set_modified(false); + // FIXME: It would be cool if this would propagate from GUI::TextDocument somehow. + window()->set_modified(false); + set_path(LexicalPath(save_path.value())); dbgln("Wrote document to {}", save_path.value()); }); @@ -310,6 +313,9 @@ MainWidget::MainWidget() GUI::MessageBox::show(window(), "Unable to save file.\n", "Error", GUI::MessageBox::Type::Error); } else { editor().document().set_modified(false); + // FIXME: It would be cool if this would propagate from GUI::TextDocument somehow. + window()->set_modified(false); + update_title(); } return; |