diff --git a/src/plugins/qmlprofiler/qml/MainView.qml b/src/plugins/qmlprofiler/qml/MainView.qml index bce1391503d..482dd03594d 100644 --- a/src/plugins/qmlprofiler/qml/MainView.qml +++ b/src/plugins/qmlprofiler/qml/MainView.qml @@ -40,8 +40,6 @@ Rectangle { property alias selectionLocked : view.selectionLocked signal updateLockButton - property alias selectedItem: view.selectedItem - signal selectedEventChanged(int eventId) property bool lockItemSelection : false property real mainviewTimePerPixel : 0 @@ -196,16 +194,6 @@ Rectangle { updateLockButton(); } - onSelectedItemChanged: { - if (selectedItem != -1 && !lockItemSelection) { - lockItemSelection = true; - // update in other views - var eventLocation = qmlProfilerModelProxy.getEventLocation(view.selectedModel, view.selectedItem); - gotoSourceLocation(eventLocation.file, eventLocation.line, eventLocation.column); - lockItemSelection = false; - } - } - Flickable { id: labelsflick flickableDirection: Flickable.VerticalFlick @@ -362,7 +350,16 @@ Rectangle { Math.max(0, Math.floor(center - windowLength/2))); zoomControl.setRange(from, from + windowLength); + } + if (!lockItemSelection) { + lockItemSelection = true; + // update in other views + var eventLocation = qmlProfilerModelProxy.getEventLocation( + view.selectedModel, view.selectedItem); + gotoSourceLocation(eventLocation.file, eventLocation.line, + eventLocation.column); + lockItemSelection = false; } } else { root.hideRangeDetails(); diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp index 7b7da1c609e..c8f6562704d 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp @@ -186,7 +186,6 @@ void QmlProfilerTraceView::reset() connect(rootObject, SIGNAL(updateLockButton()), this, SLOT(updateLockButton())); connect(this, SIGNAL(jumpToPrev()), rootObject, SLOT(prevEvent())); connect(this, SIGNAL(jumpToNext()), rootObject, SLOT(nextEvent())); - connect(rootObject, SIGNAL(selectedEventChanged(int)), this, SIGNAL(selectedEventChanged(int))); connect(rootObject, SIGNAL(changeToolTip(QString)), this, SLOT(updateToolTip(QString))); connect(this, SIGNAL(enableToolbar(bool)), this, SLOT(setZoomSliderEnabled(bool))); connect(this, SIGNAL(showZoomSlider(bool)), this, SLOT(setZoomSliderVisible(bool))); diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.h b/src/plugins/qmlprofiler/qmlprofilertraceview.h index db1626c3631..d6c0210c547 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.h +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.h @@ -104,7 +104,6 @@ private slots: signals: void gotoSourceLocation(const QString &fileUrl, int lineNumber, int columNumber); - void selectedEventChanged(int eventId); void jumpToPrev(); void jumpToNext();