Use white in wxDC::Clear() if background brush is reset in wxGTK2

Although white background was used if the brush was never set, setting
and resetting it nothing unexpectedly (and inconsistently with the other
ports) resulted in using black background.

Fix this by just resetting the brush to white if it's invalid, instead
of not setting it at all.
This commit is contained in:
Vadim Zeitlin
2019-10-02 02:43:56 +02:00
parent 40d989f297
commit 1bcde69a73

View File

@@ -1738,7 +1738,8 @@ void wxWindowDCImpl::SetBackground( const wxBrush &brush )
m_backgroundBrush = brush;
if (!m_backgroundBrush.IsOk()) return;
if (!m_backgroundBrush.IsOk())
m_backgroundBrush = *wxWHITE_BRUSH;
if (!m_gdkwindow) return;