r15556 by fschmid - Fixed hang when importing vector graphics with "File->Import Vector".

scribus-commit scribus-commit at lists.scribus.net
Mon Oct 18 00:37:28 CEST 2010


Author: fschmid
Date: Sun Oct 17 22:37:28 2010
New Revision: 15556

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15556
Log:
Fixed hang when importing vector graphics with "File->Import Vector".

Modified:
    trunk/Scribus/scribus/scribusXml.cpp
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/scribusXml.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15556&path=/trunk/Scribus/scribus/scribusXml.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusXml.cpp (original)
+++ trunk/Scribus/scribus/scribusXml.cpp Sun Oct 17 22:37:28 2010
@@ -171,6 +171,8 @@
 	OB->fill_gradient.clearStops();
 	if (OB->PType == PageItem::Symbol)
 		OB->pattern = attrAsString(attrs, "pattern", "");
+	OB->mGArrayRows = 1;
+	OB->mGArrayCols = 1;
 	if (OB->GrType != 0)
 	{
 		if (OB->GrType == 8)
@@ -1103,7 +1105,6 @@
 	{
 		ff = fileName;
 	}
-
 	// In case ff contains some old broken scribus xml
 	ff.replace(QChar(5), SpecialChars::PARSEP);
 	ff.replace(QChar(4), SpecialChars::TAB);

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15556&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Sun Oct 17 22:37:28 2010
@@ -864,8 +864,15 @@
 		m_ScMW->newActWin(((ScribusWin*)(Doc->WinHan))->getSubWin());
 		updateContents();
 		//>>
-		QFileInfo fi(url.toLocalFile());
-		QString ext = fi.suffix().toUpper();
+		QFileInfo fi;
+		QString ext = "";
+		if (!e->mimeData()->formats().contains("application/x-scribus-elem"))
+		{
+			fi.setFile(url.toLocalFile());
+			ext = fi.suffix().toUpper();
+		}
+//		QFileInfo fi(url.toLocalFile());
+//		QString ext = fi.suffix().toUpper();
 		QStringList imfo;
 		QList<QByteArray> imgs = QImageReader::supportedImageFormats();
 		for (int i = 0; i < imgs.count(); ++i )




More information about the scribus-commit mailing list