After showing the preview window the print output was empty, because file position was wrong.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31518 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -143,10 +143,12 @@ PrinterDriver::TakeJob(BFile* printJob, BMessage* settings)
|
|||||||
fGraphicsDriver = InstantiateGraphicsDriver(settings, fPrinterData, fPrinterCap);
|
fGraphicsDriver = InstantiateGraphicsDriver(settings, fPrinterData, fPrinterCap);
|
||||||
const JobData* jobData = fGraphicsDriver->getJobData(printJob);
|
const JobData* jobData = fGraphicsDriver->getJobData(printJob);
|
||||||
if (jobData != NULL && jobData->getShowPreview()) {
|
if (jobData != NULL && jobData->getShowPreview()) {
|
||||||
|
off_t offset = printJob->Position();
|
||||||
PreviewWindow *preview = new PreviewWindow(printJob, true);
|
PreviewWindow *preview = new PreviewWindow(printJob, true);
|
||||||
if (preview->Go() != B_OK) {
|
if (preview->Go() != B_OK) {
|
||||||
return new BMessage('okok');
|
return new BMessage('okok');
|
||||||
}
|
}
|
||||||
|
printJob->Seek(offset, SEEK_SET);
|
||||||
}
|
}
|
||||||
BMessage *result = fGraphicsDriver->takeJob(printJob);
|
BMessage *result = fGraphicsDriver->takeJob(printJob);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user