2626import com .ss .editor .ui .control .model .tree .ModelNodeTree ;
2727import com .ss .editor .ui .control .model .tree .action .AddUserDataAction ;
2828import com .ss .editor .ui .control .model .tree .action .RemoveNodeAction ;
29- import com .ss .editor .ui .control .model .tree .action .RenameNodeAction ;
3029import com .ss .editor .ui .control .model .tree .action .control .CreateCustomControlAction ;
3130import com .ss .editor .ui .control .model .tree .action .control .CreateMotionControlAction ;
3231import com .ss .editor .ui .control .model .tree .action .control .physics .CreateCharacterControlAction ;
@@ -75,7 +74,6 @@ public void fillContextMenu(@NotNull final NodeTree<?> nodeTree,
7574 if (toolMenu != null ) items .add (toolMenu );
7675 }
7776
78- if (canEditName ()) items .add (new RenameNodeAction (nodeTree , this ));
7977 if (canRemove ()) items .add (new RemoveNodeAction (nodeTree , this ));
8078
8179 if (linkNode == null ) {
@@ -100,14 +98,8 @@ public boolean canCopy() {
10098 @ Override
10199 @ FXThread
102100 public boolean canAccept (@ NotNull final TreeNode <?> child , final boolean isCopy ) {
103-
104101 final Object element = child .getElement ();
105-
106- if (element instanceof AbstractControl ) {
107- return true ;
108- }
109-
110- return super .canAccept (child , isCopy );
102+ return element instanceof AbstractControl || super .canAccept (child , isCopy );
111103 }
112104
113105 @ Override
@@ -227,9 +219,9 @@ public void changeName(@NotNull final NodeTree<?> nodeTree, @NotNull final Strin
227219 consumer .execute (new RenameNodeOperation (spatial .getName (), newName , spatial ));
228220 }
229221
230- @ NotNull
231222 @ Override
232- public Array <TreeNode <?>> getChildren (@ NotNull final NodeTree <?> nodeTree ) {
223+ @ FXThread
224+ public @ NotNull Array <TreeNode <?>> getChildren (@ NotNull final NodeTree <?> nodeTree ) {
233225
234226 final Array <TreeNode <?>> result = ArrayFactory .newArray (TreeNode .class );
235227 final Spatial element = getElement ();
0 commit comments