projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo in log message.
[dcpomatic.git]
/
src
/
wx
/
kdm_choice.cc
diff --git
a/src/wx/kdm_choice.cc
b/src/wx/kdm_choice.cc
index 64a43f76562d6e558c3f00612504c008dba3bffd..c8685e22c741d54844dd668d73322658b8673f23 100644
(file)
--- a/
src/wx/kdm_choice.cc
+++ b/
src/wx/kdm_choice.cc
@@
-32,9
+32,31
@@
KDMChoice::KDMChoice (wxWindow* parent)
}
}
+dcp::Formulation
+KDMChoice::get_formulation (unsigned int n) const
+{
+ return static_cast<dcp::Formulation>(reinterpret_cast<intptr_t>(GetClientData(n)));
+}
+
+
dcp::Formulation
KDMChoice::get () const
{
dcp::Formulation
KDMChoice::get () const
{
- return static_cast<dcp::Formulation>(reinterpret_cast<intptr_t>(GetClientData(GetSelection())));
+ return get_formulation(GetSelection());
+}
+
+
+void
+KDMChoice::set (dcp::Formulation type)
+{
+ for (unsigned int i = 0; i < GetCount(); ++i) {
+ if (get_formulation(i) == type) {
+ SetSelection(i);
+ return;
+ }
+ }
}
}
+
+
+