Skip to content
GitLab
Projects
Groups
Snippets
/
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
cc97175a
Commit
cc97175a
authored
Feb 13, 2019
by
legoc
Browse files
Set default value to showAxes to false
parent
d264491b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/n3d/gui/EditorMenuBar.java
View file @
cc97175a
...
...
@@ -166,7 +166,7 @@ public class EditorMenuBar extends MenuBar {
* Constructor.
*/
public
EditorMenuBar
()
{
this
.
showAxes
=
tru
e
;
this
.
showAxes
=
fals
e
;
this
.
showSystem
=
true
;
this
.
showWalls
=
true
;
this
.
showType
=
Component
.
ShowType
.
ALL
;
...
...
@@ -285,7 +285,7 @@ public class EditorMenuBar extends MenuBar {
if
(
modifiedComponent
==
null
)
{
return
;
}
// TODO This code has to be reviewed.
final
Component
selectedComponent
=
modifiedComponent
;
Axis
modifiedAxis
=
null
;
...
...
@@ -305,6 +305,8 @@ public class EditorMenuBar extends MenuBar {
// The selected axis is modified.
final
Axis
selectedAxis
=
modifiedAxis
;
selectedAxis
.
setVisible
(
true
);
// The initial axis is used to cancel the edition.
final
Axis
initialAxis
=
selectedAxis
.
clone
();
...
...
@@ -785,6 +787,8 @@ public class EditorMenuBar extends MenuBar {
updateModified
(
true
);
}
selectedAxis
.
setVisible
(
false
);
Nomad3DEditor
.
getInstance
().
getModel
().
clearSelection
();
// We can imagine to not update the entire scene here but it is easier to do it.
...
...
@@ -800,6 +804,8 @@ public class EditorMenuBar extends MenuBar {
cancelButton
.
setOnAction
(
cancelEvent
->
{
Nomad3DEditor
.
getInstance
().
getAxisBuilder
().
stop
(
modified
);
initialAxis
.
setVisible
(
false
);
// Reset the initial axis.
selectedComponent
.
setAxis
(
initialAxis
);
Nomad3DEditor
.
getInstance
().
getModel
().
clearSelection
();
...
...
@@ -1460,13 +1466,15 @@ public class EditorMenuBar extends MenuBar {
ObservableList
<
String
>
references
=
FXCollections
.
observableArrayList
(
""
);
references
.
addAll
(
ReferenceAxisList
.
getInstance
().
getNames
());
// Reference axis builder
// Reference axis builder
.
ReferenceAxisBuilder
referenceAxisBuilder
=
new
ReferenceAxisBuilder
();
// Get the root node.
Group
rootNode
=
(
Group
)
Nomad3DEditor
.
getInstance
().
getModel
().
getRoot
().
getSceneNode
();
// We must set it at the end of the group.
rootNode
.
getChildren
().
add
(
referenceAxisBuilder
.
getVisualGroup
());
// We set it at the end of the group so that it is always in front of the components.
rootNode
.
getChildren
().
add
(
0
,
referenceAxisBuilder
.
getVisualGroup
());
referenceAxisBuilder
.
getVisualGroup
().
toFront
();
///////////////////////////////////////////////////////////////////////////////////////
// Position
...
...
@@ -2098,7 +2106,7 @@ public class EditorMenuBar extends MenuBar {
this
.
lodMenu
=
new
Menu
(
"Level of detail"
);
updateLodMenu
();
CheckMenuItem
showAxesItem
=
new
CheckMenuItem
(
"Show
a
xes"
);
CheckMenuItem
showAxesItem
=
new
CheckMenuItem
(
"Show
A
xes"
);
showAxesItem
.
setAccelerator
(
new
KeyCodeCombination
(
KeyCode
.
A
,
KeyCombination
.
SHIFT_DOWN
));
showAxesItem
.
setSelected
(
this
.
showAxes
);
showAxesItem
.
setOnAction
(
new
EventHandler
<
ActionEvent
>()
{
...
...
@@ -2108,7 +2116,7 @@ public class EditorMenuBar extends MenuBar {
updateAxes
();
}
});
CheckMenuItem
showSystemItem
=
new
CheckMenuItem
(
"Show
c
oordinate
s
ystem"
);
CheckMenuItem
showSystemItem
=
new
CheckMenuItem
(
"Show
C
oordinate
S
ystem"
);
showSystemItem
.
setSelected
(
this
.
showSystem
);
showSystemItem
.
setAccelerator
(
new
KeyCodeCombination
(
KeyCode
.
Q
,
KeyCombination
.
SHIFT_DOWN
));
showSystemItem
.
setOnAction
(
new
EventHandler
<
ActionEvent
>()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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