Clear does nothing if we have a non valid brush (ie wxNullBrush)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1649,10 +1649,9 @@ void wxDC::Clear(void)
|
||||
wxCHECK_RET(Ok(), wxT("Invalid DC"));
|
||||
wxMacFastPortSetter helper(this) ;
|
||||
Rect rect = { -31000 , -31000 , 31000 , 31000 } ;
|
||||
if (m_backgroundBrush.GetStyle() != wxTRANSPARENT)
|
||||
if ( m_backgroundBrush.Ok() && m_backgroundBrush.GetStyle() != wxTRANSPARENT)
|
||||
{
|
||||
::PenNormal() ;
|
||||
//MacInstallBrush() ;
|
||||
MacSetupBackgroundForCurrentPort( m_backgroundBrush ) ;
|
||||
::EraseRect( &rect ) ;
|
||||
}
|
||||
@@ -1913,6 +1912,8 @@ void wxDC::MacInstallPen() const
|
||||
void wxDC::MacSetupBackgroundForCurrentPort(const wxBrush& background )
|
||||
{
|
||||
Pattern whiteColor ;
|
||||
if ( background.Ok() )
|
||||
{
|
||||
switch( background.MacGetBrushKind() )
|
||||
{
|
||||
case kwxMacBrushTheme :
|
||||
@@ -1946,6 +1947,7 @@ void wxDC::MacSetupBackgroundForCurrentPort(const wxBrush& background )
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wxDC::MacInstallBrush() const
|
||||
|
Reference in New Issue
Block a user