summaryrefslogtreecommitdiff
path: root/java/src/IceGridGUI/Application/TreeNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceGridGUI/Application/TreeNode.java')
-rwxr-xr-xjava/src/IceGridGUI/Application/TreeNode.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/java/src/IceGridGUI/Application/TreeNode.java b/java/src/IceGridGUI/Application/TreeNode.java
index 54e5d68ea44..ae738a718f1 100755
--- a/java/src/IceGridGUI/Application/TreeNode.java
+++ b/java/src/IceGridGUI/Application/TreeNode.java
@@ -26,8 +26,7 @@ public abstract class TreeNode extends TreeNodeBase
abstract void write(XMLWriter writer) throws java.io.IOException;
//
- // Ephemeral objects are destroyed when you switch selection
- // without "apply"ing the changes.
+ // Ephemeral objects are destroyed when discard their changes
//
public boolean isEphemeral()
{
@@ -362,7 +361,19 @@ public abstract class TreeNode extends TreeNodeBase
}
public void delete()
{
+ boolean enabled = getRoot().isSelectionListenerEnabled();
+
+ if(enabled)
+ {
+ getRoot().disableSelectionListener();
+ }
destroy();
+ getCoordinator().getCurrentTab().showNode(null);
+ if(enabled)
+ {
+ getRoot().enableSelectionListener();
+ }
+
if(_parent != null)
{
getRoot().setSelectedNode((TreeNode)_parent);