Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
Protos
Nomad 3D
nomad-3d-editor
Commits
7eb06ebf
Commit
7eb06ebf
authored
Mar 19, 2019
by
legoc
Browse files
Improved selection/deselection
parent
744809ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/n3d/gui/EditorMenuBar.java
View file @
7eb06ebf
...
@@ -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");
}
//
}
}
}
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment