Fix for issue 4336 (Control Panel: Structural changes won't refresh / no refresh button/menuentry)
Update the contents of the selected entry when the user clicks on Refresh.
| | |
| | | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 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() |
| | | { |