r22835 by jghali - #15576: scripter's setProperty() works only with two possible values of 'startArrowIndex' and 'endArrowIndex'

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 14 02:54:18 UTC 2019


Author: jghali
Date: Thu Feb 14 02:54:18 2019
New Revision: 22835

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22835
Log:
#15576: scripter's setProperty() works only with two possible values of 'startArrowIndex' and 'endArrowIndex'

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22835&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetsetprop.cpp	Thu Feb 14 02:54:18 2019
@@ -384,11 +384,7 @@
 	else if (propertyType == "int")
 	{
 		matched = true;
-		if (PyObject_IsTrue(objValue) == 0)
-			success = obj->setProperty(propertyName, 0);
-		else if (PyObject_IsTrue(objValue) == 1)
-			success = obj->setProperty(propertyName, 1);
-		else if (PyInt_Check(objValue))
+		if (PyInt_Check(objValue))
 			success = obj->setProperty(propertyName, (int)PyInt_AsLong(objValue));
 		else if (PyLong_Check(objValue))
 			success = obj->setProperty(propertyName, (int)PyLong_AsLong(objValue));




More information about the scribus-commit mailing list