r18076 by fschmid - Fixed Bug #11290: "Cancel" in the PDF/PS import dialog doesn't work as expected

scribus-commit scribus-commit at lists.scribus.net
Tue Jan 8 11:51:22 UTC 2013


Author: fschmid
Date: Tue Jan  8 11:51:21 2013
New Revision: 18076

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18076
Log:
Fixed Bug #11290: "Cancel" in the PDF/PS import dialog doesn't work as expected

Modified:
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
    trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18076&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp Tue Jan  8 11:51:21 2013
@@ -341,6 +341,7 @@
 		if (!(flags & LoadSavePlugin::lfLoadAsPattern))
 			m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+		success = false;
 	}
 	if (interactive)
 		m_Doc->setLoading(false);

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18076&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdfplugin.cpp Tue Jan  8 11:51:21 2013
@@ -165,7 +165,7 @@
 			prefs->set("wdir", fileName.left(fileName.lastIndexOf("/")));
 		}
 		else
-			return true;
+			return false;
 	}
 	m_Doc=ScCore->primaryMainWindow()->doc;
 	UndoTransaction* activeTransaction = NULL;
@@ -216,12 +216,13 @@
 			return false;
 		}
 	}
+	bool ret = false;
 	PdfPlug *dia = new PdfPlug(m_Doc, flags);
 	Q_CHECK_PTR(dia);
 	if (isCleanedFile)
-		dia->import(cleanFile, trSettings, flags);
+		ret = dia->import(cleanFile, trSettings, flags);
 	else
-		dia->import(fileName, trSettings, flags);
+		ret = dia->import(fileName, trSettings, flags);
 	if (activeTransaction)
 	{
 		activeTransaction->commit();
@@ -233,7 +234,7 @@
 	delete dia;
 	if (isCleanedFile)
 		QFile::remove(cleanFile);
-	return true;
+	return ret;
 }
 
 QImage ImportPdfPlugin::readThumbnail(const QString& fileName)

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18076&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Jan  8 11:51:21 2013
@@ -4064,6 +4064,7 @@
 			delete fileLoader;
 // 			delete view;
 			delete doc;
+			mdiArea->removeSubWindow(w->getSubWin());
 			delete w;
 			view=NULL;
 			doc=NULL;




More information about the scribus-commit mailing list