Commit 71763310 authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlProfiler: center event on clicked in details



Change-Id: I6e81089b3014f15545be4c40e0909ff2a37dbe1b
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent b9cae89a
......@@ -218,6 +218,14 @@ Rectangle {
zoomControl.setRange(newStart, newStart + windowLength);
}
function recenterOnItem( itemIndex )
{
// if item is outside of the view, jump back to its position
if (qmlEventList.getEndTime(itemIndex) < view.startTime || qmlEventList.getStartTime(itemIndex) > view.endTime) {
recenter((qmlEventList.getStartTime(itemIndex) + qmlEventList.getEndTime(itemIndex)) / 2);
}
}
function globalZoom() {
zoomControl.setRange(qmlEventList.traceStartTime(), qmlEventList.traceEndTime());
}
......
......@@ -113,6 +113,7 @@ BorderImage {
drag.target: parent
onClicked: {
root.gotoSourceLocation(file, line);
root.recenterOnItem(view.selectedItem);
}
}
......
Markdown is supported
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