mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-10 14:51:54 +02:00
[Viewer] fix lens distortion viewer status when switching between projects
When opening an empty pipeline while the lens distortion viewer was enabled, we ended up in a state where the distortion viewer remained enabled and could not be disabled anymore as its button was greyed out.
This commit is contained in:
parent
aee13b5202
commit
2a054a2701
1 changed files with 19 additions and 0 deletions
|
@ -1096,6 +1096,9 @@ FocusScope {
|
||||||
}
|
}
|
||||||
MaterialToolButton {
|
MaterialToolButton {
|
||||||
id: displayLensDistortionViewer
|
id: displayLensDistortionViewer
|
||||||
|
|
||||||
|
property int numberChanges: null
|
||||||
|
property bool previousChecked: null
|
||||||
property var activeNode: root.aliceVisionPluginAvailable && _reconstruction ? _reconstruction.activeNodes.get('sfmData').node : null
|
property var activeNode: root.aliceVisionPluginAvailable && _reconstruction ? _reconstruction.activeNodes.get('sfmData').node : null
|
||||||
property bool isComputed: {
|
property bool isComputed: {
|
||||||
if (!activeNode)
|
if (!activeNode)
|
||||||
|
@ -1127,6 +1130,22 @@ FocusScope {
|
||||||
displayHDR.checked = true
|
displayHDR.checked = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onActiveNodeChanged: {
|
||||||
|
numberChanges += 1
|
||||||
|
}
|
||||||
|
|
||||||
|
onEnabledChanged: {
|
||||||
|
if (!enabled) {
|
||||||
|
previousChecked = checked
|
||||||
|
checked = false
|
||||||
|
numberChanges = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enabled && (numberChanges == 1) && previousChecked) {
|
||||||
|
checked = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MaterialToolButton {
|
MaterialToolButton {
|
||||||
id: displayPanoramaViewer
|
id: displayPanoramaViewer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue