]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/tglbtn.cpp
use wxColourDatabase::Find() instead of deprecated FindColour(); some minor code...
[wxWidgets.git] / src / gtk1 / tglbtn.cpp
index 2a913203a71f5806eb8264ec5cf18cfd71f406e1..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,7 +169,8 @@ void wxToggleButton::OnInternalIdle()
         gdk_window_set_cursor(win, cursor.GetCursor());
     }
 
-    UpdateWindowUI();
+    if (wxUpdateUIEvent::CanUpdate(this))
+        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
 }
 
 // wxSize DoGetBestSize() const