diff --git a/meshroom/ui/qml/Viewer/FloatImage.qml b/meshroom/ui/qml/Viewer/FloatImage.qml index 662273ce9db..89f99001f34 100644 --- a/meshroom/ui/qml/Viewer/FloatImage.qml +++ b/meshroom/ui/qml/Viewer/FloatImage.qml @@ -19,8 +19,11 @@ AliceVision.FloatImageViewer { property int paintedWidth: sourceSize.width property int paintedHeight: sourceSize.height property var status: { - if (root.loading) - return Image.Loading; + if (root.loading === AliceVision.FloatImageViewer.ELoadingStatus.TRUE) + return Image.Loading + else if (root.loading === AliceVision.FloatImageViewer.ELoadingStatus.ERROR) { + return Image.Error + } else if ((root.source === "") || (root.sourceSize.height <= 0) || (root.sourceSize.width <= 0)) diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 70c9aa459a8..59b611f89aa 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -463,11 +463,11 @@ FocusScope { 'gamma': Qt.binding(function() { return hdrImageToolbar.gammaValue }), 'gain': Qt.binding(function() { return hdrImageToolbar.gainValue }), 'channelModeString': Qt.binding(function() { return hdrImageToolbar.channelModeValue }), - 'isPrincipalPointsDisplayed' : Qt.binding(function() { return lensDistortionImageToolbar.displayPrincipalPoint }), - 'surface.displayGrid' : Qt.binding(function() { return lensDistortionImageToolbar.visible && lensDistortionImageToolbar.displayGrid }), - 'surface.gridOpacity' : Qt.binding(function() { return lensDistortionImageToolbar.opacityValue }), - 'surface.gridColor' : Qt.binding(function() { return lensDistortionImageToolbar.color }), - 'surface.subdivisions' : Qt.binding(function() { return root.useFloatImageViewer ? 1 : lensDistortionImageToolbar.subdivisionsValue }), + 'isPrincipalPointsDisplayed': Qt.binding(function() { return lensDistortionImageToolbar.displayPrincipalPoint }), + 'surface.displayGrid': Qt.binding(function() { return lensDistortionImageToolbar.visible && lensDistortionImageToolbar.displayGrid }), + 'surface.gridOpacity': Qt.binding(function() { return lensDistortionImageToolbar.opacityValue }), + 'surface.gridColor': Qt.binding(function() { return lensDistortionImageToolbar.color }), + 'surface.subdivisions': Qt.binding(function() { return root.useFloatImageViewer ? 1 : lensDistortionImageToolbar.subdivisionsValue }), 'viewerTypeString': Qt.binding(function() { return displayLensDistortionViewer.checked ? "distortion" : "hdr" }), 'sfmRequired': Qt.binding(function() { return displayLensDistortionViewer.checked ? true : false }), 'surface.msfmData': Qt.binding(function() { return (msfmDataLoader.status === Loader.Ready && msfmDataLoader.item != null && msfmDataLoader.item.status === 2) ? msfmDataLoader.item : null }), @@ -476,7 +476,7 @@ FocusScope { 'cropFisheye': false, 'sequence': Qt.binding(function() { return ((root.enableSequencePlayer && _reconstruction && _reconstruction.viewpoints.count > 0) ? getSequence() : []) }), 'targetSize': Qt.binding(function() { return floatImageViewerLoader.targetSize }), - 'useSequence': Qt.binding(function() { return root.enableSequencePlayer && !useExternal && _reconstruction }), + 'useSequence': Qt.binding(function() { return root.enableSequencePlayer && !useExternal && _reconstruction }) }) } else { // Forcing the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14 @@ -745,6 +745,28 @@ FocusScope { } } } + + FloatingPane { + Layout.fillWidth: true + Layout.fillHeight: false + Layout.preferredHeight: childrenRect.height + visible: floatImageViewerLoader.item.status === Image.Error + Layout.alignment: Qt.AlignHCenter + + RowLayout { + anchors.fill: parent + + Label { + font.pointSize: 8 + text: "Missing File" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter + } + } + } + Item { id: imgPlaceholder Layout.fillWidth: true