]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/spinctrl.cpp
Fix crash in wxDC::GetMultiLineTextExtent() after last commit.
[wxWidgets.git] / src / gtk / spinctrl.cpp
index e28cc7a686f895d41983b86813b965136e9244b4..e7b798197a07cefff7eef76f1273c86432d7563d 100644 (file)
@@ -39,7 +39,7 @@ extern "C" {
 static void
 gtk_value_changed(GtkSpinButton* spinbutton, wxSpinCtrlGTKBase* win)
 {
-    if (!win->m_hasVMT || g_blockEventsOnDrag)
+    if (g_blockEventsOnDrag)
         return;
 
     if (wxIsKindOf(win, wxSpinCtrl))
@@ -69,9 +69,6 @@ extern "C" {
 static void
 gtk_changed(GtkSpinButton* spinbutton, wxSpinCtrl* win)
 {
-    if (!win->m_hasVMT)
-        return;
-
     wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, win->GetId() );
     event.SetEventObject( win );
     event.SetString(gtk_entry_get_text(GTK_ENTRY(spinbutton)));
@@ -413,17 +410,17 @@ bool wxSpinCtrl::SetBase(int base)
 
     if ( m_base != 10 )
     {
-        g_signal_connect( GTK_SPIN_BUTTON(m_widget), "input",
+        g_signal_connect( m_widget, "input",
                               G_CALLBACK(wx_gtk_spin_input), this);
-        g_signal_connect( GTK_SPIN_BUTTON(m_widget), "output",
+        g_signal_connect( m_widget, "output",
                               G_CALLBACK(wx_gtk_spin_output), this);
     }
     else
     {
-        g_signal_handlers_disconnect_by_func(GTK_SPIN_BUTTON(m_widget),
+        g_signal_handlers_disconnect_by_func(m_widget,
                                              (gpointer)wx_gtk_spin_input,
                                              this);
-        g_signal_handlers_disconnect_by_func(GTK_SPIN_BUTTON(m_widget),
+        g_signal_handlers_disconnect_by_func(m_widget,
                                              (gpointer)wx_gtk_spin_output,
                                              this);
     }