mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +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 {
|
||||
id: cameraPicker
|
||||
onPressed: pick.accepted = cameraPickingEnabled
|
||||
onReleased: _reconstruction.selectedViewId = camSelector.viewId
|
||||
property point pos
|
||||
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