mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 10:17:27 +02:00
[ui] Change selected view when hovered inside pano viewer
This commit is contained in:
parent
4d169f2b64
commit
a8936c46eb
1 changed files with 10 additions and 0 deletions
|
@ -44,6 +44,8 @@ AliceVision.PanoramaViewer {
|
||||||
|
|
||||||
property vector3d fisheyeCircleParametersPano
|
property vector3d fisheyeCircleParametersPano
|
||||||
|
|
||||||
|
property var idSelected : -1
|
||||||
|
|
||||||
onIsHighlightableChanged:{
|
onIsHighlightableChanged:{
|
||||||
for (var i = 0; i < repeater.model; i++) {
|
for (var i = 0; i < repeater.model; i++) {
|
||||||
repeater.itemAt(i).item.onChangedHighlightState(isHighlightable);
|
repeater.itemAt(i).item.onChangedHighlightState(isHighlightable);
|
||||||
|
@ -117,9 +119,13 @@ AliceVision.PanoramaViewer {
|
||||||
}
|
}
|
||||||
onPositionChanged: {
|
onPositionChanged: {
|
||||||
// Send Mouse Coordinates to Float Images Viewers
|
// Send Mouse Coordinates to Float Images Viewers
|
||||||
|
idSelected = -1;
|
||||||
for (var i = 0; i < repeater.model && isHighlightable; i++) {
|
for (var i = 0; i < repeater.model && isHighlightable; i++) {
|
||||||
var highlight = repeater.itemAt(i).item.getMouseCoordinates(mouse.x, mouse.y);
|
var highlight = repeater.itemAt(i).item.getMouseCoordinates(mouse.x, mouse.y);
|
||||||
repeater.itemAt(i).z = highlight ? 2 : 0
|
repeater.itemAt(i).z = highlight ? 2 : 0
|
||||||
|
if(highlight){
|
||||||
|
idSelected = root.msfmData.viewsIds[i]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rotate Panorama
|
// Rotate Panorama
|
||||||
|
@ -157,6 +163,10 @@ AliceVision.PanoramaViewer {
|
||||||
isRotating = false;
|
isRotating = false;
|
||||||
lastX = 0
|
lastX = 0
|
||||||
lastY = 0
|
lastY = 0
|
||||||
|
|
||||||
|
if(!mouse.wasHeld && idSelected != -1){
|
||||||
|
_reconstruction.selectedViewId = idSelected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue