]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 6 Aug 2013 13:05:36 +0000 (13:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 6 Aug 2013 13:05:36 +0000 (13:05 +0000)
Return the real height instead of -1.

Closes #15367.

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

src/propgrid/property.cpp

index a7b65da74bc41f649f8e5317791d34545b27e43b..bafa791fc48f0383369fece897d4270cba8aeeb7 100644 (file)
@@ -2198,7 +2198,7 @@ int wxPGProperty::GetY2( int lh ) const
     for ( parent = GetParent(); parent != NULL; parent = child->GetParent() )
     {
         if ( !parent->IsExpanded() )
-            return -1;
+            return parent->GetY2(lh);
         y += parent->GetChildrenHeight(lh, child->GetIndexInParent());
         y += lh;
         child = parent;