* make printing for child views working, noticed while trying to print

from Scooby, it would draw all child views on top of each other...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25580 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Karsten Heimrich
2008-05-20 20:39:47 +00:00
parent 6e251c6604
commit 75ef87aeb5
+7 -7
View File
@@ -417,8 +417,6 @@ BPrintJob::BeginJob()
// state variables
fAbort = 0;
fError = B_OK;
return;
}
@@ -471,10 +469,10 @@ BPrintJob::CommitJob()
return;
BMessage request(PSRV_PRINT_SPOOLED_JOB);
BMessage reply;
request.AddString("JobName", fPrintJobName);
request.AddString("Spool File", fSpoolFileName);
BMessage reply;
printServer.SendMessage(&request, &reply);
}
@@ -675,9 +673,11 @@ BPrintJob::_RecurseView(BView *view, BPoint origin, BPicture *picture,
BView *child = view->ChildAt(0);
while (child != NULL) {
if ((child->Flags() & B_WILL_DRAW) && !child->IsHidden()) {
// TODO: origin and rect should probably
// be converted for children views in some way
_RecurseView(child, origin, picture, rect);
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();
}
}