aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/timeline/qml/TimelineContent.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/timeline/qml/TimelineContent.qml')
-rw-r--r--src/libs/timeline/qml/TimelineContent.qml10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libs/timeline/qml/TimelineContent.qml b/src/libs/timeline/qml/TimelineContent.qml
index aae9b12229..cc5a1a7995 100644
--- a/src/libs/timeline/qml/TimelineContent.qml
+++ b/src/libs/timeline/qml/TimelineContent.qml
@@ -68,7 +68,6 @@ ScrollView {
// switch to non-interactive ourselves, though.
property bool stayInteractive: true
onStayInteractiveChanged: flick.interactive = stayInteractive
- onWidthChanged: scroll()
Flickable {
id: flick
@@ -89,6 +88,15 @@ ScrollView {
recursionGuard = false;
}
+ // Logically we should bind to scroller.width above as we use scroller.width in scroll().
+ // However, this width changes before scroller.width when the window is resized and if we
+ // don't explicitly set contentX here, for some reason an automatic change in contentX is
+ // triggered after this width has changed, but before scroller.width changes. This would be
+ // indistinguishabe from a manual flick by the user and thus changes the range position. We
+ // don't want to change the range position on resizing the window. Therefore we bind to this
+ // width.
+ onWidthChanged: scroll()
+
// Update the zoom control on scrolling.
onContentXChanged: guarded(function() {
var newStartTime = contentX * zoomer.rangeDuration / scroller.width