moved Clear() outside of if (textured)...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2000-02-10 05:00:06 +00:00
parent 1edc9f4576
commit 047473c90a

View File

@ -819,14 +819,15 @@ void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event))
dc.SetTextBackground( m_owner->m_colourBackground ); dc.SetTextBackground( m_owner->m_colourBackground );
if ( m_owner->m_textureBackground) { if ( m_owner->m_textureBackground) {
if ( m_owner->m_backgroundBrush.Ok() ) if ( ! m_owner->m_backgroundBrush.Ok() ) {
dc.SetBackground( m_owner->m_backgroundBrush );
else {
wxBrush b(wxColour(0,128,0), wxSOLID); wxBrush b(wxColour(0,128,0), wxSOLID);
dc.SetBackground(b); dc.SetBackground(b);
} }
dc.Clear(); }
dc.Clear();
if ( m_owner->m_textureBackground) {
dc.SetPen(*wxMEDIUM_GREY_PEN); dc.SetPen(*wxMEDIUM_GREY_PEN);
for (int i=0; i<200; i++) for (int i=0; i<200; i++)
dc.DrawLine(0, i*10, i*10, 0); dc.DrawLine(0, i*10, i*10, 0);