Commit 7eb06ebf authored by legoc's avatar legoc
Browse files

Improved selection/deselection

parent 744809ff
...@@ -275,11 +275,6 @@ public class EditorMenuBar extends MenuBar { ...@@ -275,11 +275,6 @@ public class EditorMenuBar extends MenuBar {
return; return;
} }
System.out.println("Selection");
for (Component c : Nomad3DEditor.getInstance().getModel().getSelection()) {
System.out.println(" " + c.getName() + " is selected");
}
HashSet<Component> selectedComponents = Component.excludeComponentsWithParentIn(Nomad3DEditor.getInstance().getModel().getSelection()); HashSet<Component> selectedComponents = Component.excludeComponentsWithParentIn(Nomad3DEditor.getInstance().getModel().getSelection());
if (selectedComponents.isEmpty()) { if (selectedComponents.isEmpty()) {
Alert alert = new Alert(AlertType.WARNING); Alert alert = new Alert(AlertType.WARNING);
...@@ -2551,19 +2546,14 @@ public class EditorMenuBar extends MenuBar { ...@@ -2551,19 +2546,14 @@ public class EditorMenuBar extends MenuBar {
@Override @Override
public void handle(ActionEvent event) { public void handle(ActionEvent event) {
System.out.println("Selection before clear");
for (Component c : Nomad3DEditor.getInstance().getModel().getSelection()) {
System.out.println(" " + c.getName() + " is selected");
}
Nomad3DEditor.getInstance().getModel().clearSelection(); Nomad3DEditor.getInstance().getModel().clearSelection();
Nomad3DEditor.getInstance().getModel().removeSelectionRelated(); Nomad3DEditor.getInstance().getModel().removeSelectionRelated();
System.out.println("Selection"); // System.out.println("Selection");
for (Component c : Nomad3DEditor.getInstance().getModel().getSelection()) { // for (Component c : Nomad3DEditor.getInstance().getModel().getSelection()) {
System.out.println(" " + c.getName() + " is selected"); // System.out.println(" " + c.getName() + " is selected");
} // }
} }
}); });
......
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