mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-177963 - Servers combo: Switch to <Auto-Detected> on last removal
- refillModel should not try to restore previous selection - refillModel should notify listeners to start detection routine
This commit is contained in:
+2
-3
@@ -171,8 +171,7 @@ public class RemoteServerCombo<S extends ServerConfiguration> extends ComboboxWi
|
||||
}
|
||||
|
||||
protected final void refillModel(@Nullable RemoteServer<?> newSelection) {
|
||||
String nameToSelect = newSelection != null ? newSelection.getName() :
|
||||
(getSelectedItem() != null ? getSelectedItem().getServerName() : null);
|
||||
String nameToSelect = newSelection != null ? newSelection.getName() : null;
|
||||
|
||||
myServerListModel.removeAll();
|
||||
ServerItem itemToSelect = null;
|
||||
@@ -198,7 +197,7 @@ public class RemoteServerCombo<S extends ServerConfiguration> extends ComboboxWi
|
||||
myServerListModel.add(nextAction);
|
||||
}
|
||||
|
||||
myServerListModel.setSelectedItem(itemToSelect);
|
||||
getComboBox().setSelectedItem(itemToSelect);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user