summaryrefslogtreecommitdiff
path: root/src/wx/wx_util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-12 22:27:11 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-12 22:27:11 +0100
commit4e411ea97b4dab8a5fa282d1d4cf7971ef1e24ad (patch)
tree06db8731e77dfeaf537f2814d73c7a599035b95c /src/wx/wx_util.cc
parent8102046b2f29e0c7b234c29bf204b056cb30e64f (diff)
parent66162217d93baa3fd50594bb013a44bbd779d02a (diff)
Merge master.
Diffstat (limited to 'src/wx/wx_util.cc')
-rw-r--r--src/wx/wx_util.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 048f87908..aac35e97a 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -190,6 +190,15 @@ checked_set (wxSpinCtrl* widget, int value)
}
void
+checked_set (wxSpinCtrlDouble* widget, double value)
+{
+ /* XXX: completely arbitrary epsilon */
+ if (fabs (widget->GetValue() - value) < 1e-16) {
+ widget->SetValue (value);
+ }
+}
+
+void
checked_set (wxChoice* widget, int value)
{
if (widget->GetSelection() != value) {
@@ -297,6 +306,12 @@ wx_get (wxChoice* w)
return w->GetSelection ();
}
+double
+wx_get (wxSpinCtrlDouble* w)
+{
+ return w->GetValue ();
+}
+
void
run_gui_loop ()
{