From a7e95315a1f29ed95dc9e2fe9997424801ea824f Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 2 Oct 2012 15:14:44 +0200 Subject: [PATCH] fixed issue 912 --- src/adaptors/UBImportPDF.cpp | 1 - src/core/UBDocumentManager.cpp | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/adaptors/UBImportPDF.cpp b/src/adaptors/UBImportPDF.cpp index fd9dc16b..10b81193 100644 --- a/src/adaptors/UBImportPDF.cpp +++ b/src/adaptors/UBImportPDF.cpp @@ -70,7 +70,6 @@ QList UBImportPDF::import(const QUuid& uuid, const QString& fil for(int pdfPageNumber = 1; pdfPageNumber <= pdfPageCount; pdfPageNumber++) { UBApplication::showMessage(tr("Importing page %1 of %2").arg(pdfPageNumber).arg(pdfPageCount), true); - result << new UBGraphicsPDFItem(pdfRenderer, pdfPageNumber); // deleted by the scene } return result; diff --git a/src/core/UBDocumentManager.cpp b/src/core/UBDocumentManager.cpp index 0eaf15b2..368c09c1 100644 --- a/src/core/UBDocumentManager.cpp +++ b/src/core/UBDocumentManager.cpp @@ -170,6 +170,10 @@ UBDocumentProxy* UBDocumentManager::importFile(const QFile& pFile, const QString foreach(UBGraphicsItem* page, pages) { UBApplication::showMessage(tr("Inserting page %1 of %2").arg(++nPage).arg(pages.size()), true); +#ifdef Q_WS_MACX + //Workaround for issue 912 + QApplication::processEvents(); +#endif int pageIndex = document->pageCount(); UBGraphicsScene* scene = UBPersistenceManager::persistenceManager()->createDocumentSceneAt(document, pageIndex); importAdaptor->placeImportedItemToScene(scene, page);