diff --git a/meshroom/ui/qml/Viewer/SequencePlayer.qml b/meshroom/ui/qml/Viewer/SequencePlayer.qml index e6fdee03d3..18b539e866 100644 --- a/meshroom/ui/qml/Viewer/SequencePlayer.qml +++ b/meshroom/ui/qml/Viewer/SequencePlayer.qml @@ -72,6 +72,10 @@ FloatingPane { onSyncSelectedChanged: { updateReconstructionView(); } + + onPlayingChanged: { + syncSelected = !playing; + } } // Exposed properties @@ -174,6 +178,7 @@ FloatingPane { id: frameLabel text: m.frame + Layout.preferredWidth: frameMetrics.width } Slider { @@ -203,8 +208,6 @@ FloatingPane { } } - property real frameLength: m.sortedViewIds.length > 0 ? width / m.sortedViewIds.length : 0 - background: Rectangle { x: frameSlider.leftPadding y: frameSlider.topPadding + frameSlider.height / 2 - height / 2 @@ -214,12 +217,15 @@ FloatingPane { color: Colors.grey Repeater { + id: cacheView + model: viewer ? viewer.cachedFrames : [] + property real frameLength: m.sortedViewIds.length > 0 ? frameSlider.width / m.sortedViewIds.length : 0 Rectangle { - x: modelData.x * frameSlider.frameLength + x: modelData.x * cacheView.frameLength y: 0 - width: frameSlider.frameLength * (modelData.y - modelData.x + 1) + width: cacheView.frameLength * (modelData.y - modelData.x + 1) height: 4 radius: 2 color: Colors.blue @@ -263,6 +269,13 @@ FloatingPane { } } + TextMetrics { + id: frameMetrics + + font: frameLabel.font + text: "10000" + } + TextMetrics { id: fpsMetrics diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index c3d5f598c7..c718a835ae 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -445,7 +445,7 @@ FocusScope { 'canBeHovered': false, 'idView': Qt.binding(function() { return (_reconstruction ? _reconstruction.selectedViewId : -1); }), 'cropFisheye': false, - 'sequence': Qt.binding(function() { return ((_reconstruction && _reconstruction.viewpoints) ? _reconstruction.allImagePaths() : []) }), + 'sequence': Qt.binding(function() { return ((_reconstruction && _reconstruction.viewpoints.count > 0) ? _reconstruction.allImagePaths() : []) }), 'useSequence': Qt.binding(function() { return !useExternal && _reconstruction && (!displayedNode || outputAttribute.name == "gallery"); }) }) } else {