From 50a18c79427ec0773fab77bdbb2092e7eb17cf01 Mon Sep 17 00:00:00 2001 From: Ryan Lucia Date: Sun, 15 Apr 2018 17:58:12 -0400 Subject: [PATCH] Use proper event for DoubleUpdater Previously changes weren't recognized because the event bound was for integers --- src/preferences_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preferences_base.cpp b/src/preferences_base.cpp index 32fa1fd7d..cb2c832d7 100644 --- a/src/preferences_base.cpp +++ b/src/preferences_base.cpp @@ -55,7 +55,7 @@ OPTION_UPDATER(StringUpdater, wxCommandEvent, OptionValueString, from_wx(evt.GetString())); OPTION_UPDATER(IntUpdater, wxSpinEvent, OptionValueInt, evt.GetInt()); OPTION_UPDATER(IntCBUpdater, wxCommandEvent, OptionValueInt, evt.GetInt()); -OPTION_UPDATER(DoubleUpdater, wxSpinEvent, OptionValueDouble, evt.GetInt()); +OPTION_UPDATER(DoubleUpdater, wxSpinDoubleEvent, OptionValueDouble, evt.GetValue()); OPTION_UPDATER(BoolUpdater, wxCommandEvent, OptionValueBool, !!evt.GetInt()); OPTION_UPDATER(ColourUpdater, ValueEvent, OptionValueColor, evt.Get()); @@ -132,7 +132,7 @@ wxControl *OptionPage::OptionAdd(wxFlexGridSizer *flex, const wxString &name, co case agi::OptionType::Double: { auto scd = new wxSpinCtrlDouble(this, -1, std::to_wstring(opt->GetDouble()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetDouble(), inc); - scd->Bind(wxEVT_SPINCTRL, DoubleUpdater(opt_name, parent)); + scd->Bind(wxEVT_SPINCTRLDOUBLE, DoubleUpdater(opt_name, parent)); Add(flex, name, scd); return scd; }