* 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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user