Avoid unnecessarily refreshing last column in generic wxDataViewCtrl
UpdateColumnSizes() was called whenever the control was modified in any way
since 4156e1a5c9
and it refreshed the entire
last column even if absolutely nothing changed.
Don't do this unless the last column width has really changed.
This commit is contained in:
@@ -4577,7 +4577,11 @@ void wxDataViewMainWindow::UpdateColumnSizes()
|
||||
if ( lastColX < fullWinWidth )
|
||||
{
|
||||
int desiredWidth = wxMax(fullWinWidth - lastColX, lastCol->GetMinWidth());
|
||||
lastCol->SetWidth(desiredWidth);
|
||||
if ( !lastCol->WXUpdateWidth(desiredWidth) )
|
||||
{
|
||||
// The column width didn't change, no need to do anything else.
|
||||
return;
|
||||
}
|
||||
|
||||
// All columns fit on screen, so we don't need horizontal scrolling.
|
||||
// To prevent flickering scrollbar when resizing the window to be
|
||||
|
Reference in New Issue
Block a user