forked from qt-creator/qt-creator
QmlProfiler: Reduce the amount of useless signals on item selection
By passing signals with identification information of varying accurary between the different views the event being selected could be changed while it was selected. By checking the current selection against the information given in the signal and not reselecting when it matches the situation is improved. Also, the selection methods are given more appropriate names. We hardly ever want to select the "next" event, but rather the "best fitting" one. Task-number: QTCREATORBUG-11945 Change-Id: I659b4929cb88f4c931a0893aa95a3bc92da5a23b Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -162,14 +162,12 @@ Rectangle {
|
||||
rangeDetails.isBindingLoop = false;
|
||||
}
|
||||
|
||||
function selectNextByHash(hash) {
|
||||
var eventId = qmlProfilerModelProxy.getEventIdForHash(hash);
|
||||
if (eventId !== -1)
|
||||
selectNextById(eventId);
|
||||
}
|
||||
|
||||
function selectNextById(eventId)
|
||||
function selectById(eventId)
|
||||
{
|
||||
if (eventId === -1 ||
|
||||
eventId === qmlProfilerModelProxy.getEventId(view.selectedModel, view.selectedItem))
|
||||
return;
|
||||
|
||||
// this is a slot responding to events from the other pane
|
||||
// which tracks only events from the basic model
|
||||
if (!lockItemSelection) {
|
||||
|
||||
Reference in New Issue
Block a user