From fd9e71afb7e78e8ee657a35f7931c415be7126ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Mon, 14 Nov 2016 20:07:22 +0100 Subject: [PATCH] Fix rendering artifacts in wxSplitterWindow sash SizeWindows() optimized rendering calls to DrawSash() too aggressively and wouldn't repaint e.g. slowly moving sash with wxSP_LIVE_UPDATE enabled, even though child windows were repositioned. Fix by always painting the sash from SizeWindows(). --- src/generic/splitter.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index cae9e6c5ae..26442e4577 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -656,8 +656,6 @@ void wxSplitterWindow::SetSashPositionAndNotify(int sashPos) // including the edges next to the sash. void wxSplitterWindow::SizeWindows() { - int oldSashPosition = m_sashPosition; - // check if we have delayed setting the real sash position if ( m_requestedSashPosition != INT_MAX ) { @@ -723,11 +721,8 @@ void wxSplitterWindow::SizeWindows() GetWindow1()->SetSize(border, border, w1, h1); } - if ( oldSashPosition != m_sashPosition ) - { - wxClientDC dc(this); - DrawSash(dc); - } + wxClientDC dc(this); + DrawSash(dc); } // Set pane for unsplit window