diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index 983e19263..a177806b8 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -1142,13 +1142,20 @@ void PropertyFloatList::setPyObject(PyObject *value) for (Py_ssize_t i=0; i= 3 + } else if (PyLong_Check(item)) { + values[i] = static_cast(PyLong_AsLong(item)); +#else + } else if (PyInt_Check(item)) { + values[i] = static_cast(PyInt_AsLong(item)); +#endif + } else { std::string error = std::string("type in list must be float, not "); error += item->ob_type->tp_name; throw Base::TypeError(error); } - - values[i] = PyFloat_AsDouble(item); } setValues(values);