]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
Fixed tree book controller sizing by invalidating size after first
[wxWidgets.git] / src / gtk / window.cpp
index 030b872037e41be952e8ae231323af2f671cb12b..ee7f1f9f464a5ac0bcbd2e37587b9b00ff5a154a 100644 (file)
@@ -23,6 +23,7 @@
     #include "wx/utils.h"
     #include "wx/frame.h"
     #include "wx/dcclient.h"
+    #include "wx/menu.h"
 #endif
 
 #include "wx/layout.h"
@@ -50,7 +51,6 @@
     #include "wx/textctrl.h"
 #endif
 
-#include "wx/menu.h"
 #include "wx/statusbr.h"
 #include "wx/settings.h"
 #include "wx/fontutil.h"
@@ -4057,7 +4057,16 @@ void wxWindowGTK::SetScrollbar( int orient, int pos, int thumbVisible,
     wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
     wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
 
-    m_hasScrolling = true;
+    if (range > 0)
+    {
+        m_hasScrolling = true;
+    }
+    else
+    {
+        // GtkRange requires upper > lower
+        range =
+        thumbVisible = 1;
+    }
 
     const int i = orient == wxVERTICAL;
     GtkAdjustment* adj = m_scrollBar[i]->adjustment;