]> git.saurik.com Git - wxWidgets.git/commitdiff
Let's make sure embedded wxPropertyGrid does not get negative size
authorJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 30 Jan 2009 17:07:18 +0000 (17:07 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 30 Jan 2009 17:07:18 +0000 (17:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/manager.cpp

index 72c53ff64fbc2838fc8533fbd1ccc85467264c21..cb2c519d7024c9eb5bc38bb3df1c13e71dc7071d 100644 (file)
@@ -1118,6 +1118,8 @@ void wxPropertyGridManager::RecalculatePositions( int width, int height )
     if ( m_iFlags & wxPG_FL_INITIALIZED )
     {
         int pgh = propgridBottomY - propgridY;
+        if ( pgh < 0 )
+            pgh = 0;
         m_pPropGrid->SetSize( 0, propgridY, width, pgh );
 
         m_extraHeight = height - pgh;