don't try to paint hidden windows

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-09-08 11:52:02 +00:00
parent 801a54412a
commit 14ac4e3a8e
2 changed files with 46 additions and 12 deletions

View File

@@ -646,11 +646,10 @@ void wxWindowDFB::Thaw()
void wxWindowDFB::PaintWindow(const wxRect& rect, bool eraseBackground)
{
if ( IsFrozen() )
return; // don't paint anything if the window is frozen
wxCHECK_RET( !IsFrozen() && IsShown(), _T("shouldn't be called") );
wxLogTrace(TRACE_PAINT,
_T("%p ('%s'): paiting region [x=%i,y=%i,w=%i,h=%i]"),
_T("%p ('%s'): painting region [x=%i,y=%i,w=%i,h=%i]"),
this, GetName().c_str(),
rect.x, rect.y, rect.width, rect.height);
@@ -694,6 +693,9 @@ void wxWindowDFB::PaintWindow(const wxRect& rect, bool eraseBackground)
{
wxWindow *child = *i;
if ( child->IsFrozen() || !child->IsShown() )
continue; // don't paint anything if the window is frozen or hidden
// compute child's area to repaint
wxRect childrect(child->GetRect());
childrect.Offset(origin);