aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-12-26 16:53:00 +0100
committerdec05eba <dec05eba@protonmail.com>2024-12-26 16:53:00 +0100
commitd07e50677a8ce235065bfede6d5d2ceb37106671 (patch)
tree873f257aef1b0a1b0871a4641f2a5ca253c4d348
parent62fe500637bd321bc75e74cc9ec97f4036a11406 (diff)
Save button should also go back to previous page
-rw-r--r--src/gui/SettingsPage.cpp6
1 files changed, 4 insertions, 2 deletions
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));