r20798 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 30 20:57:23 UTC 2016


Author: jghali
Date: Sat Jan 30 20:57:23 2016
New Revision: 20798

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20798
Log:
coverity: "array compared against 0" error in AppModeHelper

Modified:
    trunk/Scribus/scribus/appmodehelper.cpp

Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20798&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp	(original)
+++ trunk/Scribus/scribus/appmodehelper.cpp	Sat Jan 30 20:57:23 2016
@@ -102,7 +102,7 @@
 		currItem = doc->m_Selection->itemAt(0);
 
 	//Ugly hack but I have absolutly no idea about how to do this in another way
-	if(UndoManager::undoEnabled() && currItem && oldMode != newMode && (newMode == modeEditMeshPatch || oldMode == modeEditMeshPatch ||
+	if (UndoManager::undoEnabled() && currItem && oldMode != newMode && (newMode == modeEditMeshPatch || oldMode == modeEditMeshPatch ||
 																		newMode == modeEditMeshGradient || oldMode == modeEditMeshGradient ||
 																		newMode == modeEditGradientVectors || oldMode == modeEditGradientVectors ||
 																		newMode == modeEditPolygon || oldMode == modeEditPolygon ||
@@ -110,9 +110,9 @@
 																		newMode == modeEditSpiral || oldMode == modeEditSpiral))
 	{
 		SimpleState *ss = new SimpleState(Um::Mode);
-		ss->set("CHANGE_MODE","change_mode");
-		ss->set("OLD",oldMode);
-		ss->set("NEW",newMode);
+		ss->set("CHANGE_MODE");
+		ss->set("OLD", oldMode);
+		ss->set("NEW", newMode);
 		UndoManager::instance()->action(currItem,ss);
 	}
 	doc->appMode = newMode ;




More information about the scribus-commit mailing list