From 4ea5ada9050d22fcb7eed67a72358bce11c9b3df Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 10 Aug 2024 00:45:36 +0200 Subject: Settings page save settings, refactor --- src/gui/ComboBox.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gui/ComboBox.cpp') 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; -- cgit v1.2.3