Fix Python activityIntervals start and stop

Changed from Int to Float since they may be not integer
This commit is contained in:
Ale Martinez
2018-04-30 17:20:13 -03:00
parent bdf88cae98
commit cba2d1122d

View File

@@ -1247,10 +1247,10 @@ Bindings::activityIntervals(QString type, PyObject* activity) const
if (type.isEmpty() || type == RideFileInterval::typeDescription(item->type)) {
// START
PyList_SET_ITEM(startlist, idx, PyLong_FromLong(item->start));
PyList_SET_ITEM(startlist, idx, PyFloat_FromDouble(item->start));
// STOP
PyList_SET_ITEM(stoplist, idx, PyLong_FromLong(item->stop));
PyList_SET_ITEM(stoplist, idx, PyFloat_FromDouble(item->stop));
// NAME
PyList_SET_ITEM(namelist, idx, PyUnicode_FromString(item->name.toUtf8().constData()));