mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] highlight selected view in 3D + 3D picking
Spawn a cube on each camera to display which one is selected + allow picking from the 3D view
This commit is contained in:
parent
01ec927769
commit
f87024b0c5
3 changed files with 63 additions and 2 deletions
|
@ -69,10 +69,24 @@ Panel {
|
|||
viewpoint: object.value
|
||||
width: grid.cellWidth
|
||||
height: grid.cellHeight
|
||||
property bool isGridCurrentItem: GridView.isCurrentItem
|
||||
property bool isSelectedViewId: _reconstruction.selectedViewId == viewpoint.get("viewId").value
|
||||
|
||||
// need to handle this both ways
|
||||
// since arrow keys navigation modifies GridView.isCurrentItem out of our scope
|
||||
onIsGridCurrentItemChanged: {
|
||||
if(isGridCurrentItem && !isSelectedViewId)
|
||||
_reconstruction.selectedViewId = viewpoint.get("viewId").value
|
||||
}
|
||||
onIsSelectedViewIdChanged: {
|
||||
if(isSelectedViewId && !isGridCurrentItem)
|
||||
grid.currentIndex = DelegateModel.filteredIndex
|
||||
}
|
||||
|
||||
isCurrentItem: GridView.isCurrentItem
|
||||
|
||||
onPressed: {
|
||||
grid.currentIndex = DelegateModel.filteredIndex
|
||||
_reconstruction.selectedViewId = viewpoint.get("viewId").value
|
||||
if(mouse.button == Qt.LeftButton)
|
||||
grid.forceActiveFocus()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue