* 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
|
// state variables
|
||||||
fAbort = 0;
|
fAbort = 0;
|
||||||
fError = B_OK;
|
fError = B_OK;
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -471,10 +469,10 @@ BPrintJob::CommitJob()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
BMessage request(PSRV_PRINT_SPOOLED_JOB);
|
BMessage request(PSRV_PRINT_SPOOLED_JOB);
|
||||||
BMessage reply;
|
|
||||||
|
|
||||||
request.AddString("JobName", fPrintJobName);
|
request.AddString("JobName", fPrintJobName);
|
||||||
request.AddString("Spool File", fSpoolFileName);
|
request.AddString("Spool File", fSpoolFileName);
|
||||||
|
|
||||||
|
BMessage reply;
|
||||||
printServer.SendMessage(&request, &reply);
|
printServer.SendMessage(&request, &reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -675,9 +673,11 @@ BPrintJob::_RecurseView(BView *view, BPoint origin, BPicture *picture,
|
|||||||
BView *child = view->ChildAt(0);
|
BView *child = view->ChildAt(0);
|
||||||
while (child != NULL) {
|
while (child != NULL) {
|
||||||
if ((child->Flags() & B_WILL_DRAW) && !child->IsHidden()) {
|
if ((child->Flags() & B_WILL_DRAW) && !child->IsHidden()) {
|
||||||
// TODO: origin and rect should probably
|
BRect bounds(child->Bounds());
|
||||||
// be converted for children views in some way
|
BPoint childLeftTop = view->Bounds().LeftTop()
|
||||||
_RecurseView(child, origin, picture, rect);
|
+ (child->Frame().LeftTop() - bounds.LeftTop());
|
||||||
|
_RecurseView(child, origin + childLeftTop, picture,
|
||||||
|
bounds & rect.OffsetToCopy(rect.LeftTop() - childLeftTop));
|
||||||
child = child->NextSibling();
|
child = child->NextSibling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user