Commit f0e21968 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Make sure only hovered events are selected



Task-number: QTCREATORBUG-11824
Change-Id: Ib471f2a04b37e159fb7876e7f5c94ad3e8f368a9
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 20e2d1eb
......@@ -350,10 +350,16 @@ void TimelineRenderer::manageHovered(int mouseX, int mouseY)
itemRow = modelRowStart + m_profilerModelProxy->getEventRow(modelIndex, i);
if (itemRow == row) {
// There can be small events that don't reach the cursor position after large events
// that do but are in a different row.
qint64 itemEnd = m_profilerModelProxy->getEndTime(modelIndex, i);
if (itemEnd < startTime)
continue;
// match
m_currentSelection.eventIndex = i;
m_currentSelection.startTime = m_profilerModelProxy->getStartTime(modelIndex, i);
m_currentSelection.endTime = m_profilerModelProxy->getEndTime(modelIndex, i);
m_currentSelection.endTime = itemEnd;
m_currentSelection.row = row;
m_currentSelection.modelIndex = modelIndex;
if (!m_selectionLocked) {
......
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