TextEditor: Quit after saving unsaved changes on close event.
This commit is contained in:
parent
2af94bbf48
commit
75672263ce
Notes:
sideshowbarker
2024-07-19 08:46:58 +09:00
Author: https://github.com/oriko1010 Commit: https://github.com/SerenityOS/serenity/commit/75672263cec Pull-request: https://github.com/SerenityOS/serenity/pull/1404
1 changed files with 3 additions and 1 deletions
|
@ -485,8 +485,10 @@ bool TextEditorWidget::request_close()
|
|||
return true;
|
||||
auto result = GUI::MessageBox::show("The document has been modified. Would you like to save?", "Unsaved changes", GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::YesNoCancel, window());
|
||||
|
||||
if (result == GUI::MessageBox::ExecYes)
|
||||
if (result == GUI::MessageBox::ExecYes) {
|
||||
m_save_action->activate();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (result == GUI::MessageBox::ExecNo)
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue