QmlProfiler: improve selection behavior in timeline

When selecting ranges in the timeline the selector would sometimes hang
or behave weirdly when moving back. This was due to incorrect logic in
the selection bounds calculation and because the vertical flicking would
steal mouse events.

Change-Id: I14074463422d1d9a0aa8ecd1f88847e7330c9b6b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Ulf Hermann
2013-11-20 15:57:07 +01:00
parent 0489adf0cb
commit 2f8f51912c
2 changed files with 22 additions and 9 deletions

View File

@@ -309,8 +309,11 @@ Rectangle {
boundsBehavior: Flickable.StopAtBounds
// ScrollView will try to deinteractivate it. We don't want that
// as the horizontal flickable is interactive, too.
onInteractiveChanged: interactive = true
// as the horizontal flickable is interactive, too. We do occasionally
// switch to non-interactive ourselves, though.
property bool stayInteractive: true
onInteractiveChanged: interactive = stayInteractive
onStayInteractiveChanged: interactive = stayInteractive
// ***** child items
TimeMarks {
@@ -429,6 +432,9 @@ Rectangle {
onPressed: {
selectionRange.pressedOnCreation();
}
onCanceled: {
selectionRange.releasedOnCreation();
}
onPositionChanged: {
selectionRange.movedOnCreation();
}