]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tglbtn.cpp
Fixed bug [ 754596 ] wxUSE_CONSTRAINTS 0 breaks AutoLayout() with sizers
[wxWidgets.git] / src / gtk / tglbtn.cpp
index 9ad3fceec1efc34d1f28aa77176b380a517523e2..e5baaa38353870fb240cb55f1d7ea4f7488bb0eb 100644 (file)
@@ -10,6 +10,9 @@
 // License:     Rocketeer license
 /////////////////////////////////////////////////////////////////////////////
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/tglbtn.h"
 #include "wx/button.h"
 
@@ -166,8 +169,8 @@ void wxToggleButton::OnInternalIdle()
         gdk_window_set_cursor(win, cursor.GetCursor());
     }
 
-    if (wxUpdateUIEvent::CanUpdate())
-        UpdateWindowUI();
+    if (wxUpdateUIEvent::CanUpdate(this))
+        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
 }
 
 // wxSize DoGetBestSize() const