mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
Merge pull request #2283 from alicevision/fix/loadingStatus
[Viewer] Viewer: Fix various issues with the 2D Viewer
This commit is contained in:
commit
a7f73175e9
3 changed files with 21 additions and 18 deletions
|
@ -290,7 +290,7 @@ AliceVision.PanoramaViewer {
|
||||||
'canBeHovered': true,
|
'canBeHovered': true,
|
||||||
'useSequence': false
|
'useSequence': false
|
||||||
})
|
})
|
||||||
imageLoaded = Qt.binding(function() { return repeater.itemAt(index).item.status === Image.Ready ? true : false })
|
imageLoaded = Qt.binding(function() { return repeater.itemAt(index).item.imageStatus === Image.Ready ? true : false })
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ FloatingPane {
|
||||||
interval: 1000 / m.fps
|
interval: 1000 / m.fps
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (viewer.status !== Image.Ready) {
|
if (viewer.imageStatus !== Image.Ready) {
|
||||||
// Wait for current image to be displayed before switching to next image
|
// Wait for current image to be displayed before switching to next image
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ FocusScope {
|
||||||
if (!imgContainer.image)
|
if (!imgContainer.image)
|
||||||
return ""
|
return ""
|
||||||
var res = ""
|
var res = ""
|
||||||
if (imgContainer.image.status === Image.Loading) {
|
if (imgContainer.image.imageStatus === Image.Loading) {
|
||||||
res += " Image"
|
res += " Image"
|
||||||
}
|
}
|
||||||
if (mfeaturesLoader.status === Loader.Ready) {
|
if (mfeaturesLoader.status === Loader.Ready) {
|
||||||
|
@ -372,7 +372,7 @@ FocusScope {
|
||||||
|
|
||||||
colorRGBA: {
|
colorRGBA: {
|
||||||
if (!floatImageViewerLoader.item ||
|
if (!floatImageViewerLoader.item ||
|
||||||
floatImageViewerLoader.item.status !== Image.Ready) {
|
floatImageViewerLoader.item.imageStatus !== Image.Ready) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
if (floatImageViewerLoader.item.containsMouse === false) {
|
if (floatImageViewerLoader.item.containsMouse === false) {
|
||||||
|
@ -681,7 +681,7 @@ FocusScope {
|
||||||
width: imgContainer.width
|
width: imgContainer.width
|
||||||
height: imgContainer.height
|
height: imgContainer.height
|
||||||
|
|
||||||
visible: activeNode.isComputed && json !== undefined && imgContainer.image.status === Image.Ready
|
visible: activeNode.isComputed && json !== undefined && imgContainer.image.imageStatus === Image.Ready
|
||||||
source: Filepath.stringToUrl(activeNode.attribute("outputData").value)
|
source: Filepath.stringToUrl(activeNode.attribute("outputData").value)
|
||||||
viewpoint: _reconstruction.selectedViewpoint
|
viewpoint: _reconstruction.selectedViewpoint
|
||||||
zoom: imgContainer.scale
|
zoom: imgContainer.scale
|
||||||
|
@ -750,7 +750,7 @@ FocusScope {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: false
|
Layout.fillHeight: false
|
||||||
Layout.preferredHeight: childrenRect.height
|
Layout.preferredHeight: childrenRect.height
|
||||||
visible: floatImageViewerLoader.item.imageStatus === Image.Error
|
visible: floatImageViewerLoader.item !== null && floatImageViewerLoader.item.imageStatus === Image.Error
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -759,16 +759,19 @@ FocusScope {
|
||||||
Label {
|
Label {
|
||||||
font.pointSize: 8
|
font.pointSize: 8
|
||||||
text: {
|
text: {
|
||||||
switch (floatImageViewerLoader.item.status) {
|
if (floatImageViewerLoader.item !== null) {
|
||||||
case 2: // AliceVision.FloatImageViewer.EStatus.OUTDATED_LOADING
|
switch (floatImageViewerLoader.item.status) {
|
||||||
return "Outdated Loading"
|
case 2: // AliceVision.FloatImageViewer.EStatus.OUTDATED_LOADING
|
||||||
case 3: // AliceVision.FloatImageViewer.EStatus.MISSING_FILE
|
return "Outdated Loading"
|
||||||
return "Missing File"
|
case 3: // AliceVision.FloatImageViewer.EStatus.MISSING_FILE
|
||||||
case 4: // AliceVision.FloatImageViewer.EStatus.ERROR
|
return "Missing File"
|
||||||
return "Error"
|
case 4: // AliceVision.FloatImageViewer.EStatus.ERROR
|
||||||
default:
|
return "Error"
|
||||||
return ""
|
default:
|
||||||
|
return ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
@ -1041,7 +1044,7 @@ FocusScope {
|
||||||
|
|
||||||
// zoom label
|
// zoom label
|
||||||
MLabel {
|
MLabel {
|
||||||
text: ((imgContainer.image && (imgContainer.image.status === Image.Ready)) ? imgContainer.scale.toFixed(2) : "1.00") + "x"
|
text: ((imgContainer.image && (imgContainer.image.imageStatus === Image.Ready)) ? imgContainer.scale.toFixed(2) : "1.00") + "x"
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
@ -1140,7 +1143,7 @@ FocusScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTip.text: activeNode ? "Panorama Viewer " + activeNode.label : "Panorama Viewer"
|
ToolTip.text: activeNode ? "Panorama Viewer " + activeNode.label : "Panorama Viewer"
|
||||||
text: MaterialIcons.panorama_sphere
|
text: MaterialIcons.panorama_photosphere
|
||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
padding: 0
|
padding: 0
|
||||||
Layout.minimumWidth: 0
|
Layout.minimumWidth: 0
|
||||||
|
@ -1386,7 +1389,7 @@ FocusScope {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
running = Qt.binding(function() {
|
running = Qt.binding(function() {
|
||||||
return (root.usePanoramaViewer === true && imgContainer.image && imgContainer.image.allImagesLoaded === false)
|
return (root.usePanoramaViewer === true && imgContainer.image && imgContainer.image.allImagesLoaded === false)
|
||||||
|| (imgContainer.image && imgContainer.image.status === Image.Loading)
|
|| (imgContainer.image && imgContainer.image.imageStatus === Image.Loading)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// disable the visibility when unused to avoid stealing the mouseEvent to the image color picker
|
// disable the visibility when unused to avoid stealing the mouseEvent to the image color picker
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue