diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-06-02 21:15:31 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-06-02 21:15:31 +0000 |
commit | deab53cff5c212f85f5a97d68b7b30639ddd22f8 (patch) | |
tree | c25f83b77e9971f3392ea16f902de58ef2c30194 /java/src/IceGridGUI/Application/Communicator.java | |
parent | Win32 fixes (diff) | |
download | ice-deab53cff5c212f85f5a97d68b7b30639ddd22f8.tar.bz2 ice-deab53cff5c212f85f5a97d68b7b30639ddd22f8.tar.xz ice-deab53cff5c212f85f5a97d68b7b30639ddd22f8.zip |
Fixed bug #1026
Diffstat (limited to 'java/src/IceGridGUI/Application/Communicator.java')
-rwxr-xr-x | java/src/IceGridGUI/Application/Communicator.java | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/java/src/IceGridGUI/Application/Communicator.java b/java/src/IceGridGUI/Application/Communicator.java index e8d85b1b6d6..8edbc5a3b06 100755 --- a/java/src/IceGridGUI/Application/Communicator.java +++ b/java/src/IceGridGUI/Application/Communicator.java @@ -420,30 +420,6 @@ abstract class Communicator extends TreeNode implements DescriptorHolder return (up && i > 0) || (!up && i < _children.size() - 1);
}
- void move(int listIndex, int index, boolean up)
- {
- Object child = _children.remove(listIndex);
- assert child != null;
-
- getRoot().getTreeModel().nodesWereRemoved(Communicator.this,
- new int[]{index},
- new Object[]{child});
- if(up)
- {
- _children.add(listIndex - 1, child);
- getRoot().getTreeModel().nodesWereInserted(Communicator.this,
- new int[]{index - 1});
-
- }
- else
- {
- _children.add(listIndex + 1, child);
- getRoot().getTreeModel().nodesWereInserted(Communicator.this,
- new int[]{index + 1});
-
- }
- }
-
void tryAdd(Object descriptor) throws UpdateFailedException
{
addDescriptor(descriptor);
@@ -628,6 +604,7 @@ abstract class Communicator extends TreeNode implements DescriptorHolder Object descriptor = child.getDescriptor();
getEnclosingEditable().markModified();
+ getRoot().updated();
_descriptors.remove(listIndex);
if(up)
@@ -639,7 +616,25 @@ abstract class Communicator extends TreeNode implements DescriptorHolder _descriptors.add(listIndex + 1, descriptor);
}
- move(listIndex, index, up);
+ _children.remove(listIndex);
+ getRoot().getTreeModel().nodesWereRemoved(Communicator.this,
+ new int[]{index},
+ new Object[]{child});
+ if(up)
+ {
+ _children.add(listIndex - 1, child);
+ getRoot().getTreeModel().nodesWereInserted(Communicator.this,
+ new int[]{index - 1});
+
+ }
+ else
+ {
+ _children.add(listIndex + 1, child);
+ getRoot().getTreeModel().nodesWereInserted(Communicator.this,
+ new int[]{index + 1});
+
+ }
+ getRoot().setSelectedNode(child);
getCoordinator().showActions(child);
}
|