From 11e93fd50cce52f8b5087dfbb004b79e7411362d Mon Sep 17 00:00:00 2001 From: Thomas Zorroche Date: Thu, 14 Jan 2021 11:56:09 +0100 Subject: [PATCH] [Lens Distortion] Display grid only in Distortion Mode --- meshroom/ui/qml/Viewer/FloatImage.qml | 7 +++++++ meshroom/ui/qml/Viewer/Viewer2D.qml | 1 + 2 files changed, 8 insertions(+) diff --git a/meshroom/ui/qml/Viewer/FloatImage.qml b/meshroom/ui/qml/Viewer/FloatImage.qml index 51922ef4..e6249879 100644 --- a/meshroom/ui/qml/Viewer/FloatImage.qml +++ b/meshroom/ui/qml/Viewer/FloatImage.qml @@ -33,6 +33,13 @@ AliceVision.FloatImageViewer { property string channelModeString : "rgba" + property bool distortion: false + + onDistortionChanged: { + console.warn("distortion"); + root.hasDistortion(distortion); + } + channelMode: { switch(channelModeString) { diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index c5825008..2fd21320 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -227,6 +227,7 @@ FocusScope { 'isGridDisplayed' : Qt.binding(function(){ return lensDistortionImageToolbar.displayGrid;}), 'gridOpacity' : Qt.binding(function(){ return lensDistortionImageToolbar.opacityValue;}), 'gridColor' : Qt.binding(function(){ return lensDistortionImageToolbar.color;}), + 'distortion' : Qt.binding(function(){ return displayLensDistortionViewer.checked;}), }) } else { // Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14