mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:18:11 +00:00
Playground: Ask to save file contents on quit action
Prior this change, activating the action instantly closed the program.
This commit is contained in:
parent
acf3e230b0
commit
c0709c4447
1 changed files with 2 additions and 1 deletions
|
@ -221,7 +221,8 @@ int main(int argc, char** argv)
|
|||
file_menu.add_separator();
|
||||
|
||||
file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) {
|
||||
app->quit();
|
||||
if (window->on_close_request() == GUI::Window::CloseRequestDecision::Close)
|
||||
app->quit();
|
||||
}));
|
||||
|
||||
auto& edit_menu = window->add_menu("&Edit");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue