Improve behavior of occluded layer selection and dragging (#732)

Improve behavior of occluded layer dragging

Layers or groups of layers can only be dragged if they are
not occluded at the point of dragging. Otherwise the layer(s)
are deselected and the occluding layer is selected instead.

Closes #705

Co-authored-by: David Chiasson <david@sagemotion.com>
This commit is contained in:
dchiasson 2022-07-20 04:26:10 +08:00 committed by Keavon Chambers
parent f77c1f2ef4
commit b4b667ded6
1 changed files with 1 additions and 1 deletions

View File

@ -445,7 +445,7 @@ impl Fsm for SelectToolFsmState {
tool_data.layers_dragging = selected;
RotatingBounds
} else if selected.iter().any(|path| intersection.contains(path)) {
} else if intersection.last().map(|last| selected.contains(last)).unwrap_or(false) {
responses.push_back(DocumentMessage::StartTransaction.into());
tool_data.layers_dragging = selected;