]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
don't create non-existing groups in HasEntry()
[wxWidgets.git] / src / mac / carbon / window.cpp
index 6c8a60d542a5b05adc9db89c7039f7069f0633ca..7b4445cc308a214b1d2372cdfbc3532a901be7d8 100644 (file)
     #include "wx/settings.h"
     #include "wx/msgdlg.h"
     #include "wx/scrolbar.h"
+    #include "wx/statbox.h"
+    #include "wx/textctrl.h"
+    #include "wx/toolbar.h"
+    #include "wx/layout.h"
+    #include "wx/statusbr.h"
+    #include "wx/menuitem.h"
 #endif
 
-#include "wx/layout.h"
-#include "wx/statbox.h"
 #include "wx/tooltip.h"
-#include "wx/statusbr.h"
-#include "wx/menuitem.h"
 #include "wx/spinctrl.h"
 #include "wx/geometry.h"
-#include "wx/textctrl.h"
-
-#include "wx/toolbar.h"
 
 #if wxUSE_CARET
     #include "wx/caret.h"
@@ -2546,6 +2545,7 @@ void wxWindowMac::SetScrollbar(int orient, int pos, int thumbVisible,
     int range, bool refresh)
 {
     bool showScroller;
+    bool triggerSizeEvent = false;
 
     if ( orient == wxHORIZONTAL )
     {
@@ -2553,7 +2553,10 @@ void wxWindowMac::SetScrollbar(int orient, int pos, int thumbVisible,
         {
             showScroller = ((range != 0) && (range > thumbVisible));
             if ( m_hScrollBar->IsShown() != showScroller )
-                m_hScrollBar->Show( showScroller ) ;
+            {
+                m_hScrollBar->Show( showScroller );
+                triggerSizeEvent = true;
+            }
 
             m_hScrollBar->SetScrollbar( pos , thumbVisible , range , thumbVisible , refresh ) ;
         }
@@ -2564,13 +2567,22 @@ void wxWindowMac::SetScrollbar(int orient, int pos, int thumbVisible,
         {
             showScroller = ((range != 0) && (range > thumbVisible));
             if ( m_vScrollBar->IsShown() != showScroller )
+            {
                 m_vScrollBar->Show( showScroller ) ;
+                triggerSizeEvent = true;
+            }
 
             m_vScrollBar->SetScrollbar( pos , thumbVisible , range , thumbVisible , refresh ) ;
         }
     }
 
     MacRepositionScrollBars() ;
+    if ( triggerSizeEvent )
+    {
+        wxSizeEvent event(GetSize(), m_windowId);
+        event.SetEventObject(this);
+        GetEventHandler()->ProcessEvent(event);
+    }
 }
 
 // Does a physical scroll