Check wxPropertyGrid column widths against virtual size

In virtual width mode total width of columns cannot be lesser than virtual width.
This commit is contained in:
Artur Wieczorek
2019-05-20 20:19:16 +02:00
parent a07c14a31d
commit 5fc0af423e

View File

@@ -1065,14 +1065,12 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
} }
else else
{ {
// Only check colsWidth against clientWidth // Only adapt colsWidth to width
if ( colsWidth < clientWidth ) if ( colsWidth < m_width )
{ {
m_colWidths.back() += (clientWidth-colsWidth); m_colWidths.back() += (m_width-colsWidth);
} }
m_width = colsWidth;
// If width changed, recalculate virtual size // If width changed, recalculate virtual size
if ( IsDisplayed() ) if ( IsDisplayed() )
pg->RecalculateVirtualSize(); pg->RecalculateVirtualSize();