]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/menu.cpp
minor additions to wxCmdLineParser tests
[wxWidgets.git] / src / univ / menu.cpp
index 4151a9523661e5aecb6d2dba9a4da71d0d41d63c..586b829b2d23e7b4eae87a819a4c41e3905ce116 100644 (file)
@@ -1548,6 +1548,9 @@ void wxMenuBar::Attach(wxFrame *frame)
         SetCursor(wxCURSOR_ARROW);
 
         SetFont(wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT));
+
+        // calculate and set our height (it won't be changed any more)
+        SetSize(-1, GetBestSize().y);
     }
 
     // remember the last frame which had us to avoid unnecessarily reparenting
@@ -2292,8 +2295,7 @@ void wxMenuBar::OnDismissMenu(bool dismissMenuBar)
 
 void wxMenuBar::OnDismiss()
 {
-    if ( GetCapture() )
-        ReleaseMouse();
+    ReleaseMouse();
 
     if ( m_current != -1 )
     {