r14696 by jghali - #8804 : createPolyLine, createPolygon and createBezierLine with explicit id's make scribus crash

scribus-commit scribus-commit at lists.scribus.net
Fri Feb 12 22:50:40 CET 2010


Revision: 14696
Author: jghali
Date: 2010-02-12T21:45:47.522639Z
Commit message: #8804 : createPolyLine, createPolygon and createBezierLine with explicit id's make scribus crash

Changeset: 
M  /trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp

Diffs:
Index: scribus/plugins/scriptplugin/cmdobj.cpp
===================================================================
--- scribus/plugins/scriptplugin/cmdobj.cpp	(revision 14695)
+++ scribus/plugins/scriptplugin/cmdobj.cpp	(revision 14696)
@@ -296,8 +296,8 @@
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
 		{
-			ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
-			ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
+			ScCore->primaryMainWindow()->doc->Items->at(ic)->setItemName(objName);
+			ScCore->primaryMainWindow()->doc->Items->at(ic)->AutoName = false;
 		}
 	}
 	return PyString_FromString(it->itemName().toUtf8());
@@ -383,8 +383,8 @@
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
 		{
-			ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
-			ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
+			ScCore->primaryMainWindow()->doc->Items->at(ic)->setItemName(objName);
+			ScCore->primaryMainWindow()->doc->Items->at(ic)->AutoName = false;
 		}
 	}
 	return PyString_FromString(it->itemName().toUtf8());
@@ -479,8 +479,8 @@
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
 		{
-			ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
-			ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
+			ScCore->primaryMainWindow()->doc->Items->at(ic)->setItemName(objName);
+			ScCore->primaryMainWindow()->doc->Items->at(ic)->AutoName = false;
 		}
 	}
 	return PyString_FromString(it->itemName().toUtf8());




More information about the scribus-commit mailing list