Commit 55420e2b authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlProfiler: fix offset difference between timeline and overview



Change-Id: Ic91a203018e31eb14445deb39fa5a83ebc621ee7
Reviewed-by: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent 487b56b0
......@@ -111,8 +111,8 @@ void TimelineView::updateTimeline(bool updateStartX)
m_totalWidth = totalRange * m_spacing;
int minsample = m_eventList->findFirstIndex(m_startTime + m_eventList->firstTimeMark());
int maxsample = m_eventList->findLastIndex(m_endTime + m_eventList->firstTimeMark());
int minsample = m_eventList->findFirstIndex(m_startTime + m_eventList->traceStartTime());
int maxsample = m_eventList->findLastIndex(m_endTime + m_eventList->traceStartTime());
if (updateStartX) {
qreal oldStartX = m_startX;
......@@ -201,7 +201,7 @@ void TimelineView::updateItemPosition(int itemIndex)
{
QDeclarativeItem *item = m_items.value(itemIndex);
if (item) {
qreal itemStartPos = (m_eventList->getStartTime(itemIndex) - m_eventList->firstTimeMark()) * m_spacing;
qreal itemStartPos = (m_eventList->getStartTime(itemIndex) - m_eventList->traceStartTime()) * m_spacing;
item->setX(itemStartPos);
qreal width = (m_eventList->getEndTime(itemIndex) - m_eventList->getStartTime(itemIndex)) * m_spacing;
item->setWidth(width > 1 ? width : 1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment