X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9ff9d30c0aab3b281ef9b380eac17435556c5088..e1f833da2a8bbe01cc96c0d7a3542ac2c1d6d6f0:/src/gtk/spinbutt.cpp?ds=sidebyside diff --git a/src/gtk/spinbutt.cpp b/src/gtk/spinbutt.cpp index 45138d8ae4..4ed8250624 100644 --- a/src/gtk/spinbutt.cpp +++ b/src/gtk/spinbutt.cpp @@ -175,6 +175,20 @@ void wxSpinButton::OnSize( wxSizeEvent &WXUNUSED(event) ) gtk_widget_set_size_request( m_widget, m_width, m_height ); } +bool wxSpinButton::Enable( bool enable ) +{ + bool isEnabled = IsEnabled(); + + if ( !wxControl::Enable( enable ) ) + return false; + + // Work around lack of visual update when enabling + if (!isEnabled && enable) + GTKFixSensitivity(false /* fix even if not under mouse */); + + return true; +} + void wxSpinButton::GtkDisableEvents() const { g_signal_handlers_block_by_func(m_widget,