From 3d115cb858bec3c3444f1c53d222ccff69b396b3 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 11 Nov 2009 16:33:52 +0000
Subject: [PATCH] Fix for issue 4336 (Control Panel: Structural changes won't refresh / no refresh button/menuentry)
---
opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java | 19 +++++++++++++++++++
opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java | 4 ++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
index 8c887be..1b40e85 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/BrowseEntriesPanel.java
@@ -1582,6 +1582,25 @@
private void refreshClicked()
{
+ // Refresh the contents of the selected entry.
+ TreePath[] paths = treePane.getTree().getSelectionPaths();
+ if (paths != null && paths.length == 1)
+ {
+ if (entryPane.mustCheckUnsavedChanges())
+ {
+ switch (entryPane.checkUnsavedChanges())
+ {
+ case DO_NOT_SAVE:
+ break;
+ case SAVE:
+ break;
+ case CANCEL:
+ // Do nothing.
+ return;
+ }
+ }
+ updateRightPane(paths);
+ }
entryPane.getController().startRefresh(null);
}
}
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
index 00ff0ca..1ba4f40 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/LDAPEntryPanel.java
@@ -722,9 +722,9 @@
/**
* Tells whether the user chose to save the changes in the panel, to not save
- * them or simply cancelled the selection change in the tree.
+ * them or simply canceled the selection change in the tree.
* @return the value telling whether the user chose to save the changes in the
- * panel, to not save them or simply cancelled the selection in the tree.
+ * panel, to not save them or simply canceled the selection in the tree.
*/
public UnsavedChangesDialog.Result checkUnsavedChanges()
{
--
Gitblit v1.10.0