mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +02:00
[ui] AlembicLoader: only select cameras on still left-clicks
don't trigger Camera selection if mouse has moved to rotate camera
This commit is contained in:
parent
796517ccb1
commit
2a3093b292
1 changed files with 14 additions and 2 deletions
|
@ -57,10 +57,22 @@ AlembicEntity {
|
||||||
},
|
},
|
||||||
ObjectPicker {
|
ObjectPicker {
|
||||||
id: cameraPicker
|
id: cameraPicker
|
||||||
onPressed: pick.accepted = cameraPickingEnabled
|
property point pos
|
||||||
onReleased: _reconstruction.selectedViewId = camSelector.viewId
|
onPressed: {
|
||||||
|
pos = pick.position;
|
||||||
|
pick.accepted = (pick.buttons & Qt.LeftButton) && cameraPickingEnabled
|
||||||
|
}
|
||||||
|
onReleased: {
|
||||||
|
const delta = Qt.point(Math.abs(pos.x - pick.position.x), Math.abs(pos.y - pick.position.y));
|
||||||
|
// only trigger picking when mouse has not moved between press and release
|
||||||
|
if(delta.x + delta.y < 4)
|
||||||
|
{
|
||||||
|
_reconstruction.selectedViewId = camSelector.viewId;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue