mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
[Distortion Viewer] fix subdivisions display problem
This commit is contained in:
parent
d1ebb8135d
commit
fbf9e45b75
2 changed files with 21 additions and 11 deletions
|
@ -26,6 +26,10 @@ AliceVision.FloatImageViewer {
|
||||||
(root.sourceSize.height <= 0))
|
(root.sourceSize.height <= 0))
|
||||||
return Image.Null;
|
return Image.Null;
|
||||||
|
|
||||||
|
if(!isDistoViewer){
|
||||||
|
root.updateSubdivisions(1)
|
||||||
|
}
|
||||||
|
|
||||||
root.defaultControlPoints();
|
root.defaultControlPoints();
|
||||||
updateSfmPath();
|
updateSfmPath();
|
||||||
|
|
||||||
|
@ -72,7 +76,18 @@ AliceVision.FloatImageViewer {
|
||||||
|
|
||||||
onIsDistoViewerChanged: {
|
onIsDistoViewerChanged: {
|
||||||
root.hasDistortion(isDistoViewer);
|
root.hasDistortion(isDistoViewer);
|
||||||
root.displayGrid(isDistoViewer);
|
//Putting states back where they were
|
||||||
|
if(isDistoViewer){
|
||||||
|
root.displayGrid(isGridDisplayed);
|
||||||
|
repeater.displayControlPoints(isCtrlPointsDisplayed)
|
||||||
|
root.updateSubdivisions(subdivisions)
|
||||||
|
}
|
||||||
|
//Forcing disabling of parameters
|
||||||
|
else{
|
||||||
|
root.isGridDisplayed(isDistoViewer)
|
||||||
|
repeater.displayControlPoints(isDistoViewer)
|
||||||
|
root.updateSubdivisions(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onIsGridDisplayedChanged: {
|
onIsGridDisplayedChanged: {
|
||||||
|
@ -85,7 +100,7 @@ AliceVision.FloatImageViewer {
|
||||||
}
|
}
|
||||||
|
|
||||||
onIsCtrlPointsDisplayedChanged: {
|
onIsCtrlPointsDisplayedChanged: {
|
||||||
repeater.displayControlPoints()
|
repeater.displayControlPoints(isCtrlPointsDisplayed)
|
||||||
}
|
}
|
||||||
|
|
||||||
onGridOpacityChanged: {
|
onGridOpacityChanged: {
|
||||||
|
@ -190,7 +205,7 @@ AliceVision.FloatImageViewer {
|
||||||
x: root.getVertex(model.index).x - (width / 2)
|
x: root.getVertex(model.index).x - (width / 2)
|
||||||
y: root.getVertex(model.index).y - (height / 2)
|
y: root.getVertex(model.index).y - (height / 2)
|
||||||
color: Colors.yellow
|
color: Colors.yellow
|
||||||
visible: isDistoViewer
|
visible: isDistoViewer && isCtrlPointsDisplayed
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseAreaCP
|
id: mouseAreaCP
|
||||||
anchors.fill : parent;
|
anchors.fill : parent;
|
||||||
|
@ -210,14 +225,9 @@ AliceVision.FloatImageViewer {
|
||||||
id: repeater
|
id: repeater
|
||||||
model: pointsNumber
|
model: pointsNumber
|
||||||
delegate: rectGrid
|
delegate: rectGrid
|
||||||
function displayControlPoints() {
|
function displayControlPoints(state) {
|
||||||
for (let i = 0; i < model; i++) {
|
for (let i = 0; i < model; i++) {
|
||||||
if (repeater.itemAt(i).visible) {
|
repeater.itemAt(i).visible = state;
|
||||||
repeater.itemAt(i).visible = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
repeater.itemAt(i).visible = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ FloatingPane {
|
||||||
padding: 5
|
padding: 5
|
||||||
Layout.minimumWidth: 0
|
Layout.minimumWidth: 0
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: false
|
checked: true
|
||||||
}
|
}
|
||||||
ColorChart {
|
ColorChart {
|
||||||
id : gridColorPicker
|
id : gridColorPicker
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue