mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 01:06:01 +08:00
Select All Feature (#184)
If anything is selected, A deselects all. If nothing is selected, A selects all.
This commit is contained in:
parent
305af376c5
commit
c51a3a8f67
@ -297,6 +297,17 @@ namespace XNodeEditor {
|
||||
} else {
|
||||
if (e.keyCode == KeyCode.F2) RenameSelectedNode();
|
||||
}
|
||||
if (e.keyCode == KeyCode.A) {
|
||||
if (Selection.objects.Any(x => graph.nodes.Contains(x))) {
|
||||
foreach (XNode.Node node in graph.nodes) {
|
||||
DeselectNode(node);
|
||||
}
|
||||
} else {
|
||||
foreach (XNode.Node node in graph.nodes) {
|
||||
SelectNode(node, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EventType.ValidateCommand:
|
||||
case EventType.ExecuteCommand:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user