* don't print child views with invalid rect, this makes printing e.g.

from Scooby nearly the same as on R5 (still misses the gray header color)
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25769 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Karsten Heimrich 2008-06-02 20:21:40 +00:00
parent 3e24801283
commit 15c0cece2b
1 changed files with 5 additions and 6 deletions

View File

@ -673,13 +673,12 @@ BPrintJob::_RecurseView(BView *view, BPoint origin, BPicture *picture,
BView *child = view->ChildAt(0);
while (child != NULL) {
if ((child->Flags() & B_WILL_DRAW) && !child->IsHidden()) {
BRect bounds(child->Bounds());
BPoint childLeftTop = view->Bounds().LeftTop()
+ (child->Frame().LeftTop() - bounds.LeftTop());
_RecurseView(child, origin + childLeftTop, picture,
bounds & rect.OffsetToCopy(rect.LeftTop() - childLeftTop));
child = child->NextSibling();
BPoint leftTop(view->Bounds().LeftTop() + child->Frame().LeftTop());
BRect printRect(rect.OffsetToCopy(rect.LeftTop() - leftTop) & child->Bounds());
if (printRect.IsValid())
_RecurseView(child, origin + leftTop, picture, printRect);
}
child = child->NextSibling();
}
if (view->Flags() & B_DRAW_ON_CHILDREN) {