diff options
author | Karol Kosek <krkk@serenityos.org> | 2022-02-20 18:39:37 +0100 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-03-04 11:56:52 -0500 |
commit | 5c978266e3028dd5560f121f079ed28301ba0218 (patch) | |
tree | 0748bc005ad724620eed18a885315d38436bcf25 /Userland/Applications/Spreadsheet | |
parent | cef595aa5c266acf3f292b92983d7920fd20ea07 (diff) | |
download | serenity-5c978266e3028dd5560f121f079ed28301ba0218.zip |
Spreadsheet: Ask about unsaved changes on "Open..." action activation
Diffstat (limited to 'Userland/Applications/Spreadsheet')
-rw-r--r-- | Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp index 733f8b5187..05bfc18b6a 100644 --- a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp +++ b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp @@ -122,6 +122,9 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe }); m_open_action = GUI::CommonActions::make_open_action([&](auto&) { + if (!request_close()) + return; + Optional<String> load_path = GUI::FilePicker::get_open_filepath(window()); if (!load_path.has_value()) return; |