diff --git a/src/libs/qmljsdebugclient/qmlprofilereventlist.cpp b/src/libs/qmljsdebugclient/qmlprofilereventlist.cpp index 26486f3d600..b337c2552bd 100644 --- a/src/libs/qmljsdebugclient/qmlprofilereventlist.cpp +++ b/src/libs/qmljsdebugclient/qmlprofilereventlist.cpp @@ -1360,6 +1360,8 @@ void QmlProfilerEventList::load() rangedEvent.frameRate = attributes.value("framerate").toString().toInt(); if (attributes.hasAttribute("animationcount")) rangedEvent.animationCount = attributes.value("animationcount").toString().toInt(); + else + rangedEvent.animationCount = -1; if (attributes.hasAttribute("eventIndex")) { int ndx = attributes.value("eventIndex").toString().toInt(); if (!descriptionBuffer.value(ndx)) diff --git a/src/plugins/qmlprofiler/timelineview.cpp b/src/plugins/qmlprofiler/timelineview.cpp index 325dd0d591c..c98f273b18f 100644 --- a/src/plugins/qmlprofiler/timelineview.cpp +++ b/src/plugins/qmlprofiler/timelineview.cpp @@ -145,9 +145,11 @@ void TimelineView::drawItemsToPainter(QPainter *p, int fromIndex, int toIndex) // special: animations if (eventType == 0 && m_eventList->getAnimationCount(i) >= 0) { double scale = m_eventList->getMaximumAnimationCount() - m_eventList->getMinimumAnimationCount(); - if (scale < 1) - scale = 1; - double fraction = (double)(m_eventList->getAnimationCount(i) - m_eventList->getMinimumAnimationCount()) / scale; + double fraction; + if (scale > 1) + fraction = (double)(m_eventList->getAnimationCount(i) - m_eventList->getMinimumAnimationCount()) / scale; + else + fraction = 1.0; height = DefaultRowHeight * (fraction * 0.85 + 0.15); y += DefaultRowHeight - height;