From 5fc0af423e95543c545af7dff9b7fd38ef69fa3f Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Mon, 20 May 2019 20:19:16 +0200 Subject: [PATCH] Check wxPropertyGrid column widths against virtual size In virtual width mode total width of columns cannot be lesser than virtual width. --- src/propgrid/propgridpagestate.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 2e925ede48..4bc4f4eb1c 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -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();