mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Spreadsheet: Ask about unsaved changes on "Open..." action activation
This commit is contained in:
parent
cef595aa5c
commit
5c978266e3
Notes:
sideshowbarker
2024-07-17 17:57:45 +09:00
Author: https://github.com/krkk
Commit: 5c978266e3
Pull-request: https://github.com/SerenityOS/serenity/pull/12863
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