diff options
Diffstat (limited to 'src/wx/dcpomatic_choice.cc')
| -rw-r--r-- | src/wx/dcpomatic_choice.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wx/dcpomatic_choice.cc b/src/wx/dcpomatic_choice.cc index 168d76430..cf43b13ed 100644 --- a/src/wx/dcpomatic_choice.cc +++ b/src/wx/dcpomatic_choice.cc @@ -88,3 +88,15 @@ Choice::get() const return sel; } + +optional<wxString> +Choice::get_data() const +{ + auto index = get(); + if (!index) { + return {}; + } + + return dynamic_cast<wxStringClientData*>(GetClientObject(*index))->GetData(); +} + |
