Skip to content

Commit

Permalink
Added: Allow select of child nodes by holding ctrl down during select.
Browse files Browse the repository at this point in the history
rpavlik: Applied build fixes and loop migrations

Co-authored-by: Rylie Pavlik <[email protected]>
  • Loading branch information
jmcgillivray and rpavlik committed Jan 10, 2024
1 parent a61df8b commit 28469c7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions VUE2/src/main/java/tufts/vue/MapViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -7952,9 +7952,19 @@ else if (mouseWasDragged && (indication == null || indication instanceof LWConta
// selectionType = LWNode.class;
// else
// selectionType = activeTool.getSelectionType();
List<LWComponent> list = computeSelection(screenToMapRect(draggedSelectorBox));

if (e.isControlDown()) {
List<LWComponent> childList = new ArrayList<>();

for (LWComponent selectedItem : list) {
if (selectedItem.hasChildren()) {
childList.addAll(selectedItem.getChildren());
}
}
list.addAll(childList);
}

List list = computeSelection(screenToMapRect(draggedSelectorBox));

if (e.isShiftDown())
selectionToggle(list);
else
Expand Down

0 comments on commit 28469c7

Please sign in to comment.