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.
This commit is contained in:
Vadim Zeitlin
2019-10-19 23:00:58 +02:00
parent 6af316b537
commit 248d4a8631

View File

@@ -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;