From c8ca1df2cba490de35549a0f069c1e7e773cbf61 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 1 Oct 2019 01:23:10 +0200 Subject: [PATCH] Don't clear background with transparent brush in wxGCDC Bail out immediately if the background brush is transparent, for consistency with the other wxDC implementations. See #10273. --- src/common/dcgraph.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 8fb3b5a73d..dc6d018fb2 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -1284,6 +1284,9 @@ void wxGCDCImpl::Clear(void) { wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::Clear - invalid DC") ); + if ( m_backgroundBrush.IsTransparent() ) + return; + if ( m_backgroundBrush.IsOk() ) { m_graphicContext->SetBrush( m_backgroundBrush );