From 248d4a8631008d6e3c0c77581a50bdaa8e601742 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Oct 2019 23:00:58 +0200 Subject: [PATCH] Fix size of the last column after the previous commit The loop computing "colswidth" (the sum of widths including last column) actually incorrectly computed "lastColX" (the sum of widths until the last column), fix this. See #18295. --- src/generic/datavgen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 22627a3ea2..762abf92ba 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -5090,16 +5090,16 @@ void wxDataViewMainWindow::UpdateColumnSizes() return; } - int colswidth = 0; + int lastColX = 0; for ( int colIndex = 0; colIndex < lastColIndex; ++colIndex ) { const wxDataViewColumn *c = owner->GetColumnAt(colIndex); if ( !c->IsHidden() ) - colswidth += c->GetWidth(); + lastColX += c->GetWidth(); } - int lastColX = colswidth - lastCol->GetWidth(); + int colswidth = lastColX + lastCol->GetWidth(); if ( lastColX < fullWinWidth ) { const int availableWidth = fullWinWidth - lastColX;