Fix clip monitor zoom not reset when changing clip, and zone incorrect on zoom


(cherry picked from commit 44ce7aea)
parent 9a053d65
Pipeline #29875 passed with stage
in 10 minutes and 9 seconds
......@@ -362,8 +362,8 @@ Rectangle {
id: zone
visible: controller.zoneOut > controller.zoneIn
color: activePalette.highlight
x: controller.zoneIn * root.timeScale / root.zoomFactor - ruler.rulerZoomOffset
width: (controller.zoneOut - controller.zoneIn) * root.timeScale / root.zoomFactor
x: controller.zoneIn * root.timeScale - ruler.rulerZoomOffset
width: (controller.zoneOut - controller.zoneIn) * root.timeScale
anchors.bottom: parent.bottom
height: ruler.height / 2
opacity: 0.8
......
......@@ -73,11 +73,6 @@ Item {
onDurationChanged: {
clipMonitorRuler.updateRuler()
// Reset zoom on clip change
root.zoomStart = 0
root.zoomFactor = 1
root.showZoomBar = false
root.zoomOffset = 0
}
onWidthChanged: {
clipMonitorRuler.updateRuler()
......@@ -86,6 +81,12 @@ Item {
// Animate clip name
clipNameLabel.opacity = 1
showAnimate.restart()
// Reset zoom on clip change
root.zoomStart = 0
root.zoomFactor = 1
root.showZoomBar = false
root.zoomOffset = 0
// adjust monitor image size if audio thumb is displayed
if (audioThumb.stateVisible && root.permanentAudiothumb && audioThumb.visible) {
controller.rulerHeight = audioThumb.height + root.zoomOffset
......
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