r14751 by fschmid - Backported Fix for Bug #8833: "ScriptRunning boolean flag out of sync after calling placeSVG, placeEPS etc. "

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 17 14:50:44 CET 2010


Revision: 14751
Author: fschmid
Date: 2010-02-17T13:42:46.287703Z
Commit message: Backported Fix for Bug #8833: "ScriptRunning boolean flag out of sync after calling placeSVG, placeEPS etc. "

Changeset: 
M  /branches/Version135/Scribus/scribus/plugins/psimport/importps.cpp
M  /branches/Version135/Scribus/scribus/plugins/xfigimplugin/importxfig.cpp
M  /branches/Version135/Scribus/scribus/plugins/aiimplugin/importai.cpp
M  /branches/Version135/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp
M  /branches/Version135/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
M  /branches/Version135/Scribus/scribus/plugins/wmfimplugin/wmfimport.cpp

Diffs:
Index: scribus/plugins/wmfimplugin/wmfimport.cpp
===================================================================
--- scribus/plugins/wmfimplugin/wmfimport.cpp	(revision 14750)
+++ scribus/plugins/wmfimplugin/wmfimport.cpp	(revision 14751)
@@ -574,6 +574,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
+	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
 	m_Doc->scMW()->ScriptRunning = true;
 	qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
 	//gc->Family = m_Doc->toolSettings.defFont;
@@ -659,7 +660,7 @@
 		}
 	}
 	m_Doc->DoDrawing = true;
-	m_Doc->scMW()->ScriptRunning = false;
+	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 	if (interactive)
 		m_Doc->setLoading(false);
 	qApp->setOverrideCursor(QCursor(Qt::ArrowCursor));
Index: scribus/plugins/aiimplugin/importai.cpp
===================================================================
--- scribus/plugins/aiimplugin/importai.cpp	(revision 14750)
+++ scribus/plugins/aiimplugin/importai.cpp	(revision 14751)
@@ -207,6 +207,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
+	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
 	m_Doc->scMW()->ScriptRunning = true;
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
@@ -275,7 +276,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = false;
+		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -340,7 +341,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = false;
+		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/xfigimplugin/importxfig.cpp
===================================================================
--- scribus/plugins/xfigimplugin/importxfig.cpp	(revision 14750)
+++ scribus/plugins/xfigimplugin/importxfig.cpp	(revision 14751)
@@ -224,6 +224,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
+	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
 	m_Doc->scMW()->ScriptRunning = true;
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
@@ -293,7 +294,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = false;
+		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -358,7 +359,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = false;
+		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/svgimplugin/svgplugin.cpp
===================================================================
--- scribus/plugins/svgimplugin/svgplugin.cpp	(revision 14750)
+++ scribus/plugins/svgimplugin/svgplugin.cpp	(revision 14751)
@@ -305,6 +305,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
+	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
 	m_Doc->scMW()->ScriptRunning = true;
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	gc->FontFamily = m_Doc->toolSettings.defFont;
@@ -422,7 +423,7 @@
 		}
 	}
 	m_Doc->DoDrawing = true;
-	m_Doc->scMW()->ScriptRunning = false;
+	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 	if (interactive)
 		m_Doc->setLoading(false);
 	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
Index: scribus/plugins/fileloader/oodraw/oodrawimp.cpp
===================================================================
--- scribus/plugins/fileloader/oodraw/oodrawimp.cpp	(revision 14750)
+++ scribus/plugins/fileloader/oodraw/oodrawimp.cpp	(revision 14751)
@@ -387,6 +387,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
+	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
 	m_Doc->scMW()->ScriptRunning = true;
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	if (!m_Doc->PageColors.contains("Black"))
@@ -482,7 +483,7 @@
 		}
 	}
 	m_Doc->DoDrawing = true;
-	m_Doc->scMW()->ScriptRunning = false;
+	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 	if (interactive)
 		m_Doc->setLoading(false);
 	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
Index: scribus/plugins/psimport/importps.cpp
===================================================================
--- scribus/plugins/psimport/importps.cpp	(revision 14750)
+++ scribus/plugins/psimport/importps.cpp	(revision 14751)
@@ -222,6 +222,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
+	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
 	m_Doc->scMW()->ScriptRunning = true;
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
@@ -293,7 +294,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = false;
+		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -358,7 +359,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = false;
+		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}




More information about the scribus-commit mailing list