]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/splitter.cpp
Fixed [ 1561693 ] wxGIFDecoder creates incorrect wxPalette
[wxWidgets.git] / src / generic / splitter.cpp
index 9e357621d6aba958ba3c1a2f94779758fd804250..6e084f1696e5cd895820a1d8b2a3b7b9317921b3 100644 (file)
@@ -681,17 +681,25 @@ void wxSplitterWindow::SizeWindows()
         {
             w1 = size1;
             w2 = w - 2*border - sash - w1;
-            h1 =
+            if (w2 < 0)
+                w2 = 0;
             h2 = h - 2*border;
+            if (h2 < 0)
+                h2 = 0;
+            h1 = h2;
             x2 = size2;
             y2 = border;
         }
         else // horz splitter
         {
-            w1 =
             w2 = w - 2*border;
+            if (w2 < 0)
+                w2 = 0;
+            w1 = w2;
             h1 = size1;
             h2 = h - 2*border - sash - h1;
+            if (h2 < 0)
+                h2 = 0;
             x2 = border;
             y2 = size2;
         }