Commit c836392e authored by Ivan Dages's avatar Ivan Dages
Browse files

select all : consistent with blender

parent 8969d07b
......@@ -1476,19 +1476,11 @@ public class EditorMenuBar extends MenuBar {
if (Nomad3DEditor.getInstance().getModel() == null || activeConfiguration == null) {
return;
}
Nomad3DEditor.getInstance().getModel().selectAll();
updateFocus();
}
});
MenuItem unselectAllItem = new MenuItem("Unselect all");
unselectAllItem.setAccelerator(new KeyCodeCombination(KeyCode.U));
unselectAllItem.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
if (Nomad3DEditor.getInstance().getModel() == null || activeConfiguration == null) {
return;
if (Nomad3DEditor.getInstance().getModel().getSelection().isEmpty()) {
Nomad3DEditor.getInstance().getModel().selectAll();
} else {
Nomad3DEditor.getInstance().getModel().clearSelection();
}
Nomad3DEditor.getInstance().getModel().clearSelection();
updateFocus();
}
});
......@@ -1562,7 +1554,7 @@ public class EditorMenuBar extends MenuBar {
}
Nomad3DEditor.getInstance().getModel().clearSelection();
});
this.selection.getItems().addAll(selectAllItem, unselectAllItem,
this.selection.getItems().addAll(selectAllItem,
new SeparatorMenuItem(),
showSelectionItem, hideSelectionItem, focusSelectionItem,
new SeparatorMenuItem(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment