Commit 8e3845b7 authored by helene ortiz's avatar helene ortiz
Browse files

In settings commandbox, combos were not cleared before refresh + (root)

directory was not correctly initialised.
parent 7ffab573
......@@ -6,7 +6,7 @@
* Fix bug: when synchronizing view state of launchpad (among box view or text view), also synchronize swithview button icon.
* Fix bug: delete of an unknown command box in the launch pad did not delete it on server side.
* Keep arrow down and up for combo boxes, add CTRL key to move down/up among command boxes.
* Fix bug: in settings commandbox, combos were not cleared before refresh + (root) directory was not correctly initialised.
4.0.60 26/08/2020
------
......
......@@ -156,6 +156,8 @@ public class SWTSettingsCommandBoxPeer extends SWTCommandBoxPeer implements ISet
public void loadSettingsDirectories() {
currentDirectoryCombo.removeAll();
currentDirectoryCombo.add(ConfigManager.getInstance().getString("rootDirectoryLabel"));
List<String> sortedList = new ArrayList<String>(SettingsUtilities.getInstance().getSettingsDirectories(commandBox.getName()));
if (!sortedList.isEmpty()) {
Iterator<String> it = sortedList.iterator();
......@@ -184,6 +186,8 @@ public class SWTSettingsCommandBoxPeer extends SWTCommandBoxPeer implements ISet
currentDirectoryCombo.setText(directory);
loadSettingsFiles();
fileName = directoryAndFileName.substring(directoryAndFileName.indexOf(ConfigManager.FILE_SEPARATOR)+1);
} else {
currentDirectoryCombo.setText(ConfigManager.getInstance().getString("rootDirectoryLabel"));
}
if (loadCombo.indexOf(fileName) != -1) {
......@@ -256,7 +260,7 @@ public class SWTSettingsCommandBoxPeer extends SWTCommandBoxPeer implements ISet
*
*/
public void loadSettingsFiles() {
loadCombo.removeAll();
String directory = getParentDirectory();
if (directory == null) {
directory = commandBox.getName();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment