projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add Choice::get_data().
[dcpomatic.git]
/
src
/
wx
/
dcpomatic_choice.cc
diff --git
a/src/wx/dcpomatic_choice.cc
b/src/wx/dcpomatic_choice.cc
index 168d76430bfc3822fce2a2685c6980fbf74d6142..cf43b13edc2a8ba1e6b0954db64816b80f3a424c 100644
(file)
--- 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();
+}
+