mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
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.
This commit is contained in:
parent
f0cc712246
commit
a7fb50567b
Notes:
sideshowbarker
2024-07-18 18:48:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a7fb50567be
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue