Skip to content

Commit 169df5b

Browse files
fix behavior of server/account combobox in datasource panel.
1 parent 2f204c5 commit 169df5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-cosmos/src/main/java/com/microsoft/azure/toolkit/intellij/cosmos/dbtools/AzureCosmosDbAccountParamEditor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ private void setAccount(@Nullable CosmosDBAccount account) {
183183
manager.runOnPooledThread(() -> {
184184
this.connectionString = Optional.ofNullable(account).map(CosmosDBAccount::getCosmosDBAccountPrimaryConnectionString).orElse(null);
185185
manager.runLater(() -> {
186+
final boolean fromExplorer = Objects.nonNull(interchange.getProperty(KEY_FROM_AZURE_EXPLORER));
187+
interchange.putProperty(KEY_FROM_AZURE_EXPLORER, null);
186188
interchange.putProperty(KEY_COSMOS_ACCOUNT_ID, Optional.ofNullable(newAccountId).orElse(NONE));
187-
if (Objects.isNull(account) || Objects.isNull(connectionString) || StringUtils.equalsIgnoreCase(oldAccountId, newAccountId)) {
189+
if (Objects.isNull(account) || Objects.isNull(connectionString) || StringUtils.equalsIgnoreCase(oldAccountId, newAccountId) && !fromExplorer) {
188190
this.updating = false;
189191
return;
190192
}

0 commit comments

Comments
 (0)