diff --git a/meshroom/ui/qml/Viewer/FloatImage.qml b/meshroom/ui/qml/Viewer/FloatImage.qml index e1ddc345..70115b7c 100644 --- a/meshroom/ui/qml/Viewer/FloatImage.qml +++ b/meshroom/ui/qml/Viewer/FloatImage.qml @@ -16,12 +16,10 @@ AliceVision.FloatImageViewer { visible: (status === Image.Ready) property var sfmData - onSfmDataChanged: { root.surface.msfmData = sfmData; } - // paintedWidth / paintedHeight / status for compatibility with standard Image property int paintedWidth: textureSize.width property int paintedHeight: textureSize.height @@ -30,7 +28,7 @@ AliceVision.FloatImageViewer { return Image.Loading; else if((root.source === "") || (root.sourceSize.height <= 0) || - (root.sourceSize.height <= 0)) + (root.sourceSize.width <= 0)) return Image.Null; return Image.Ready; @@ -69,18 +67,11 @@ AliceVision.FloatImageViewer { } } - property bool isPrincipalPointsDisplayed : false; property int pointsNumber: (surface.subdivisions + 1) * (surface.subdivisions + 1); property int index: 0; property var idView: 0; - function updatePrincipalPoint() { - var pp = root.surface.getPrincipalPoint(); - ppRect.x = pp.x; - ppRect.y = pp.y; - } - clearBeforeLoad: true property alias containsMouse: mouseArea.containsMouse @@ -116,6 +107,15 @@ AliceVision.FloatImageViewer { /* * Principal Point */ + + function updatePrincipalPoint() { + var pp = root.surface.getPrincipalPoint(); + ppRect.x = pp.x; + ppRect.y = pp.y; + } + + property bool isPrincipalPointsDisplayed : false; + Item { id: principalPoint Rectangle { diff --git a/meshroom/ui/qml/Viewer/PanoramaViewer.qml b/meshroom/ui/qml/Viewer/PanoramaViewer.qml index aca47286..e0e686e2 100644 --- a/meshroom/ui/qml/Viewer/PanoramaViewer.qml +++ b/meshroom/ui/qml/Viewer/PanoramaViewer.qml @@ -59,7 +59,7 @@ AliceVision.PanoramaViewer { property var activeNode: _reconstruction.activeNodes.get('SfMTransform').node - // Yaw and Pitch in Degrees from SfMTransform sliders + // Yaw and Pitch in Degrees from SfMTransform node sliders property int yawNode: activeNode.attribute("manualTransform.manualRotation.y").value; property int pitchNode: activeNode.attribute("manualTransform.manualRotation.x").value; @@ -181,15 +181,7 @@ AliceVision.PanoramaViewer { function updateSfmPath() { var activeNode = _reconstruction.activeNodes.get('SfMTransform').node; - - if(!activeNode) - { - root.sfmPath = ""; - } - else - { - root.sfmPath = activeNode.attribute("input").value; - } + root.sfmPath = (activeNode) ? activeNode.attribute("input").value : ""; } property var pathList : [] diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index d3475508..0b151d79 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -311,7 +311,8 @@ FocusScope { 'isHighlightable': Qt.binding(function(){ return panoramaViewerToolbar.enableHover;}), 'displayGridPano': Qt.binding(function(){ return panoramaViewerToolbar.displayGrid;}), 'mouseMultiplier': Qt.binding(function(){ return panoramaViewerToolbar.mouseSpeed;}), - 'sfmData': Qt.binding(function() { return (msfmDataLoader.status === Loader.Ready && msfmDataLoader.item.status === 2) ? msfmDataLoader.item : null; }), + 'sfmData': Qt.binding(function() { return (msfmDataLoader.status === Loader.Ready + && msfmDataLoader.item.status === 2) ? msfmDataLoader.item : null; }), }) } else { // Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14 @@ -322,8 +323,6 @@ FocusScope { onLoaded: { panoramaViewerLoader.item.updateSfmPath(); } - - } // Simple QML Image Viewer (using Qt or qtOIIO to load images)