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

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


Author: craig
Date: Tue Oct  7 21:17:19 2014
New Revision: 19558

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

Modified:
    branches/Version14x/Scribus/scribus/scribus.cpp

Modified: branches/Version14x/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19558&path=/branches/Version14x/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribus.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribus.cpp Tue Oct  7 21:17:19 2014
@@ -3921,7 +3921,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 )
 	{
@@ -3930,7 +3930,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"),
@@ -3944,7 +3944,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