mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
HackStudio: Also ask about unsaved changes when running
HackStudio now also asks about unsaved changes when trying to run, instead of only on build.
This commit is contained in:
parent
02cc2e0f8f
commit
53d73b95ce
Notes:
sideshowbarker
2024-07-17 20:58:35 +09:00
Author: https://github.com/david072 Commit: https://github.com/SerenityOS/serenity/commit/53d73b95ce Pull-request: https://github.com/SerenityOS/serenity/pull/21728 Reviewed-by: https://github.com/AtkinsSJ ✅
@ -1323,6 +1323,9 @@ ErrorOr<NonnullRefPtr<GUI::Action>> HackStudioWidget::create_run_action()
|
||||
{
|
||||
auto icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/program-run.png"sv));
|
||||
return GUI::Action::create("&Run", { Mod_Ctrl, Key_R }, icon, [this](auto&) {
|
||||
if (warn_unsaved_changes("There are unsaved changes, do you want to save before running?") == ContinueDecision::No)
|
||||
return;
|
||||
|
||||
reveal_action_tab(*m_terminal_wrapper);
|
||||
run();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user