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:
@@ -1738,7 +1738,8 @@ void wxWindowDCImpl::SetBackground( const wxBrush &brush )
|
|||||||
|
|
||||||
m_backgroundBrush = brush;
|
m_backgroundBrush = brush;
|
||||||
|
|
||||||
if (!m_backgroundBrush.IsOk()) return;
|
if (!m_backgroundBrush.IsOk())
|
||||||
|
m_backgroundBrush = *wxWHITE_BRUSH;
|
||||||
|
|
||||||
if (!m_gdkwindow) return;
|
if (!m_gdkwindow) return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user