diff options
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; |