]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied FL patch from Stefan Kowski
authorJulian Smart <julian@anthemion.co.uk>
Fri, 21 Feb 2003 16:02:33 +0000 (16:02 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 21 Feb 2003 16:02:33 +0000 (16:02 +0000)
"Enclosed there is a patch for the FL library that solves a problem
overwriting the status bar if a bar is expanded.

Cause of this is the calculation of the new window height which may be less
than 0 in some cases. In my test a value of -1 caused the window default
height to be set which was larger than the space available, therefore the
status bar was overwritten."

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/fl/panedrawpl.cpp

index cc3625ffc182c898985b8c5608fa5fc015f7172b..214ffa148f46874598463dac8d1956cf4382081c 100644 (file)
@@ -591,10 +591,14 @@ void cbPaneDrawPlugin::OnSizeBarWindow( cbSizeBarWndEvent& event )
 
         // FIXME:: +/- 1s
 
+        int nNewHeight = bounds.height - 2 - bar.mDimInfo.mVertGap *2;
+        if(nNewHeight < 0)
+           nNewHeight = 0;
+
         bar.mpBarWnd->wxWindow::SetSize( bounds.x      + 1 + bar.mDimInfo.mHorizGap,     
                                          bounds.y      + 1 + bar.mDimInfo.mVertGap,
                                          bounds.width  - 2 - bar.mDimInfo.mHorizGap*2,
-                                         bounds.height - 2 - bar.mDimInfo.mVertGap *2 , 
+                                         nNewHeight,
                                          0 
                                        );