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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user