mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
Spreadsheet: Ask about unsaved changes on "Open..." action activation
This commit is contained in:
parent
cef595aa5c
commit
5c978266e3
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue