update archive properties panel after rename

This commit is contained in:
nik
2009-10-02 15:50:15 +04:00
parent 2160679e36
commit 4a5b070c40
2 changed files with 5 additions and 4 deletions
@@ -176,6 +176,7 @@ public class LayoutTree extends SimpleDnDAwareTree implements AdvancedDnDSource
if (stopped && currentElement != null) {
currentElement.rename(newValue);
myArtifactsEditor.queueValidation();
myArtifactsEditor.getLayoutTreeComponent().updatePropertiesPanel(true);
addSubtreeToUpdate((DefaultMutableTreeNode)path.getLastPathComponent());
}
return stopped;
@@ -69,7 +69,7 @@ public class LayoutTreeComponent implements DnDTarget, Disposable {
myTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
updatePropertiesPanel();
updatePropertiesPanel(false);
}
});
createPropertiesPanel();
@@ -114,9 +114,9 @@ public class LayoutTreeComponent implements DnDTarget, Disposable {
return myTree;
}
public void updatePropertiesPanel() {
public void updatePropertiesPanel(final boolean force) {
final PackagingElement<?> selected = getSelection().getElementIfSingle();
if (Comparing.equal(selected, mySelectedElementInfo.myElement)) {
if (force || Comparing.equal(selected, mySelectedElementInfo.myElement)) {
return;
}
mySelectedElementInfo.save();
@@ -130,7 +130,7 @@ public class LayoutTreeComponent implements DnDTarget, Disposable {
public void rebuildTree() {
myBuilder.updateFromRoot(true);
updatePropertiesPanel();
updatePropertiesPanel(true);
myArtifactsEditor.queueValidation();
}