1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16: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:
MowfaqAlarbi 2019-09-07 00:57:34 +02:00 committed by Thor Brigsted
parent 305af376c5
commit c51a3a8f67

View File

@ -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: