reduce the locked section a bit

svn path=/trunk/KDE/kdegraphics/okular/; revision=712976
This commit is contained in:
Pino Toscano 2007-09-15 21:55:12 +00:00
parent 2a258a92f9
commit ac970f2d6c

View file

@ -881,7 +881,6 @@ bool PDFGenerator::print( KPrinter& printer )
if (!printer.previewOnly()) pageList = printer.pageList();
else for(int i = 1; i <= pdfdoc->numPages(); i++) pageList.push_back(i);
userMutex()->lock();
// TODO rotation
#ifdef HAVE_POPPLER_0_6
double xScale = ((double)width - (double)marginLeft - (double)marginRight) / (double)width;
@ -918,6 +917,7 @@ bool PDFGenerator::print( KPrinter& printer )
psConverter->setStrictMargins(strictMargins);
psConverter->setForceRasterize(forceRasterize);
psConverter->setTitle(pstitle);
userMutex()->lock();
if (psConverter->convert())
{
userMutex()->unlock();
@ -928,6 +928,7 @@ bool PDFGenerator::print( KPrinter& printer )
{
delete psConverter;
#else
userMutex()->lock();
if (pdfdoc->print(tempfilename, pageList, 72, 72, 0, width, height))
{
userMutex()->unlock();