Merge pull request #1421 from SiboVG/issue-1420
[#1420] Add clicked component check
This commit is contained in:
commit
b8b91ffac2
@ -596,6 +596,8 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change
|
|||||||
List<RocketComponent> selectedComponents = Arrays.stream(selectionModel.getSelectionPaths())
|
List<RocketComponent> selectedComponents = Arrays.stream(selectionModel.getSelectionPaths())
|
||||||
.map(c -> (RocketComponent) c.getLastPathComponent()).collect(Collectors.toList());
|
.map(c -> (RocketComponent) c.getLastPathComponent()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (clicked == null || clicked.length == 0) return;
|
||||||
|
|
||||||
// If the shift-button is held, add a newly clicked component to the selection path
|
// If the shift-button is held, add a newly clicked component to the selection path
|
||||||
if ((event.isShiftDown() || event.isMetaDown()) && event.getClickCount() == 1) {
|
if ((event.isShiftDown() || event.isMetaDown()) && event.getClickCount() == 1) {
|
||||||
List<TreePath> paths = new ArrayList<>(Arrays.asList(selectionModel.getSelectionPaths()));
|
List<TreePath> paths = new ArrayList<>(Arrays.asList(selectionModel.getSelectionPaths()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user