diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-10 00:45:36 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-10 00:45:36 +0200 |
commit | 4ea5ada9050d22fcb7eed67a72358bce11c9b3df (patch) | |
tree | ad5f1e5956d972ad7c6948d4ba2f753d47a4b315 /src/gui/ComboBox.cpp | |
parent | 1a49f86e9841035fe670f6b42a3c988f737267d2 (diff) |
Settings page save settings, refactor
Diffstat (limited to 'src/gui/ComboBox.cpp')
-rw-r--r-- | src/gui/ComboBox.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/ComboBox.cpp b/src/gui/ComboBox.cpp index 373b06b..f23a323 100644 --- a/src/gui/ComboBox.cpp +++ b/src/gui/ComboBox.cpp @@ -161,6 +161,15 @@ namespace gsr { } } + const std::string& ComboBox::get_selected_id() const { + if(items.empty()) { + static std::string dummy; + return dummy; + } else { + return items[selected_item].id; + } + } + void ComboBox::update_if_dirty() { if(!dirty) return; |