changeset 7887:dc9971d9268f

[SCENEBUILDER] Fix DTL-6802 : Changing focus order for GridPane by Hierarchy Pane doesn't work
author slions
date Wed, 03 Sep 2014 12:11:22 +0200
parents 77ee61dc5811
children bcd84f2065ae
files apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/HierarchyDNDController.java
diffstat 1 files changed, 7 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/HierarchyDNDController.java	Wed Sep 03 09:21:51 2014 +0200
+++ b/apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/HierarchyDNDController.java	Wed Sep 03 12:11:22 2014 +0200
@@ -36,7 +36,6 @@
 import com.oracle.javafx.scenebuilder.kit.editor.drag.target.AbstractDropTarget;
 import com.oracle.javafx.scenebuilder.kit.editor.drag.target.AccessoryDropTarget;
 import com.oracle.javafx.scenebuilder.kit.editor.drag.target.ContainerZDropTarget;
-import com.oracle.javafx.scenebuilder.kit.editor.drag.target.GridPaneDropTarget;
 import com.oracle.javafx.scenebuilder.kit.editor.drag.target.RootDropTarget;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument;
 import com.oracle.javafx.scenebuilder.kit.fxom.FXOMInstance;
@@ -45,7 +44,6 @@
 import com.oracle.javafx.scenebuilder.kit.metadata.util.DesignHierarchyMask.Accessory;
 import javafx.scene.control.TreeItem;
 import javafx.scene.input.DragEvent;
-import javafx.scene.layout.GridPane;
 
 /**
  * Controller for all drag and drop gestures in hierarchy panel. This class does
@@ -411,22 +409,18 @@
                         = new DesignHierarchyMask(dropTargetInstance);
                 // Check if the drop target accepts sub components
                 if (dropTargetMask.isAcceptingSubComponent(dragSource.getDraggedObjects())) {
-                    if (dropTargetInstance.getSceneGraphObject() instanceof GridPane) {
-                        result = new GridPaneDropTarget(dropTargetInstance, targetIndex);
+                    final FXOMObject beforeChild;
+                    if (targetIndex == -1) {
+                        beforeChild = null;
                     } else {
-                        final FXOMObject beforeChild;
-                        if (targetIndex == -1) {
+                        // targetIndex is the last sub component
+                        if (targetIndex == dropTargetMask.getSubComponentCount()) {
                             beforeChild = null;
                         } else {
-                            // targetIndex is the last sub component
-                            if (targetIndex == dropTargetMask.getSubComponentCount()) {
-                                beforeChild = null;
-                            } else {
-                                beforeChild = dropTargetMask.getSubComponentAtIndex(targetIndex);
-                            }
+                            beforeChild = dropTargetMask.getSubComponentAtIndex(targetIndex);
                         }
-                        result = new ContainerZDropTarget(dropTargetInstance, beforeChild);
                     }
+                    result = new ContainerZDropTarget(dropTargetInstance, beforeChild);
                 } //
                 // Check if the drop target accepts accessories
                 else {