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
{
// Only check colsWidth against clientWidth
if ( colsWidth < clientWidth )
// Only adapt colsWidth to width
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 ( IsDisplayed() )
pg->RecalculateVirtualSize();