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.
This commit is contained in:
Vadim Zeitlin
2019-10-01 01:23:10 +02:00
parent 771832ebbb
commit c8ca1df2cb

View File

@@ -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 );