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:
Michael Pfeiffer 2009-07-11 14:00:53 +00:00
parent e391ec67b7
commit b3491b369f
1 changed files with 2 additions and 0 deletions

View File

@ -143,10 +143,12 @@ PrinterDriver::TakeJob(BFile* printJob, BMessage* settings)
fGraphicsDriver = InstantiateGraphicsDriver(settings, fPrinterData, fPrinterCap);
const JobData* jobData = fGraphicsDriver->getJobData(printJob);
if (jobData != NULL && jobData->getShowPreview()) {
off_t offset = printJob->Position();
PreviewWindow *preview = new PreviewWindow(printJob, true);
if (preview->Go() != B_OK) {
return new BMessage('okok');
}
printJob->Seek(offset, SEEK_SET);
}
BMessage *result = fGraphicsDriver->takeJob(printJob);