]> git.saurik.com Git - wxWidgets.git/commitdiff
don't waste time updating state of tools in a hidden toolbar (patch 1612415)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Mar 2007 02:30:35 +0000 (02:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Mar 2007 02:30:35 +0000 (02:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/tbarbase.cpp

index 50c80846d5054022817eff76fee251e48521e767..553065ee7374773a345642be79222daefc1504b5 100644 (file)
@@ -645,6 +645,10 @@ void wxToolBarBase::UpdateWindowUI(long flags)
 {
     wxWindowBase::UpdateWindowUI(flags);
 
+    // don't waste time updating state of tools in a hidden toolbar
+    if ( !IsShown() )
+        return;
+
     // There is no sense in updating the toolbar UI
     // if the parent window is about to get destroyed
     wxWindow *tlw = wxGetTopLevelParent( this );