From d07e50677a8ce235065bfede6d5d2ceb37106671 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 26 Dec 2024 16:53:00 +0100 Subject: Save button should also go back to previous page --- src/gui/SettingsPage.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/SettingsPage.cpp b/src/gui/SettingsPage.cpp index 7613d11..12044b7 100644 --- a/src/gui/SettingsPage.cpp +++ b/src/gui/SettingsPage.cpp @@ -578,10 +578,12 @@ namespace gsr { select_directory_page->add_widget(std::move(file_chooser)); select_directory_page->on_click = [this, file_chooser_ptr](const std::string &id) { - if(id == "save") + if(id == "save") { save_directory_button_ptr->set_text(file_chooser_ptr->get_current_directory()); - else if(id == "cancel") page_stack->pop(); + } else if(id == "cancel") { + page_stack->pop(); + } }; page_stack->push(std::move(select_directory_page)); -- cgit v1.2.3