From 0fb97907e1a4bf0489c386a609d7908d33d37a3e Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 31 Aug 2018 19:45:45 +0530 Subject: [PATCH] Fix generic wxHeaderCtrl repainting in scrolled state Clear the device context used for painting the tabs to avoid repainting issues. Closes https://github.com/wxWidgets/wxWidgets/pull/908 Closes #18209. --- src/generic/headerctrlg.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp index 0254cfa8d6..ce150b8430 100644 --- a/src/generic/headerctrlg.cpp +++ b/src/generic/headerctrlg.cpp @@ -490,6 +490,7 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) #endif wxAutoBufferedPaintDC dc(this); + dc.Clear(); // account for the horizontal scrollbar offset in the parent window dc.SetDeviceOrigin(m_scrollOffset, 0);