r19559 by craig - #12747: Fix opening same document multiple times from scripter

scribus-commit scribus-commit at lists.scribus.net
Tue Oct 7 21:17:30 UTC 2014


Author: craig
Date: Tue Oct  7 21:17:30 2014
New Revision: 19559

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19559
Log:
#12747: Fix opening same document multiple times from scripter

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19559&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Oct  7 21:17:30 2014
@@ -3890,7 +3890,7 @@
 	// PV - 5780: Scribus doesn't track what documents are already opened
 	// The goal of this part of code is to disallow user to open one
 	// doc multiple times.
-	QString platfName(QDir::toNativeSeparators(fileName));
+	QString FName = fi.absoluteFilePath();
 	uint windowCount = windows.count();
 	for ( uint i = 0; i < windowCount; ++i )
 	{
@@ -3899,7 +3899,7 @@
 		if (mx && mx->doc()->isModified() && docNameUnmodified.endsWith("*"))
 			docNameUnmodified.resize(docNameUnmodified.length() - 1);
 
-		if (docNameUnmodified == platfName)
+		if (docNameUnmodified == FName)
 		{
 			qApp->restoreOverrideCursor();
 			QMessageBox::information(this, tr("Document is already opened"),
@@ -3913,7 +3913,6 @@
 	UndoBlocker undoBlocker;
 	if (!fileName.isEmpty())
 	{
-		QString FName = fi.absoluteFilePath();
 		FileLoader *fileLoader = new FileLoader(FName);
 		int testResult = fileLoader->testFile();
 		if (testResult == -1)




More information about the scribus-commit mailing list