From bf266ca348f7a26e00af89161f3172dcd490b589 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 21 Jun 2020 00:29:55 +0200 Subject: [PATCH] Avoid unnecessarily refreshing native header in wxGrid We don't need to refresh it after resizing, it takes care of itself and calling Refresh() just results in extra flicker. See #18794. --- src/generic/grid.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 5a92397095..50fc4c49e8 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -9844,7 +9844,10 @@ void wxGrid::DoSetColSize( int col, int width ) FurtherWindowPartRefresher refreshFurtherPart(x); - refreshFurtherPart(m_colLabelWin); + // Refreshing the native header is unnecessary, as it updates + // itself correctly anyhow, and just results in extra flicker. + if ( !IsUsingNativeHeader() ) + refreshFurtherPart(m_colLabelWin); refreshFurtherPart(m_gridWin); if ( m_frozenRowGridWin )