]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tbarbase.cpp
Fixed bug with disappearing menus. They were
[wxWidgets.git] / src / common / tbarbase.cpp
index 93e0bab7c7d989db72edcfb6ff2a02016dc074fa..4279126dd41d706ba3d1b64d6c5ff2096232c147 100644 (file)
@@ -28,8 +28,9 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_TOOLBAR
+
 #ifndef WX_PRECOMP
-    #include "wx/wx.h"
 #endif
 
 #include "wx/frame.h"
 #include <windows.h>
 #endif
 
-#if wxUSE_TOOLBAR
-
 #include "wx/tbarbase.h"
 
 // ----------------------------------------------------------------------------
 // wxWindows macros
 // ----------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
-    BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
-        EVT_IDLE(wxToolBarBase::OnIdle)
-    END_EVENT_TABLE()
-#endif
-
 IMPLEMENT_CLASS(wxToolBarBase, wxControl)
 
+BEGIN_EVENT_TABLE(wxToolBarBase, wxControl)
+    EVT_IDLE(wxToolBarBase::OnIdle)
+END_EVENT_TABLE()
+
 #include "wx/listimpl.cpp"
 
 WX_DEFINE_LIST(wxToolBarToolsList);
@@ -321,6 +318,8 @@ wxToolBarToolBase *wxToolBarBase::FindById(int id) const
             // found
             break;
         }
+
+        tool = NULL;
     }
 
     return tool;