Skip to content

Commit

Permalink
fix behavior of server/account combobox in datasource panel.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangmingliang-ms committed Dec 2, 2022
1 parent 2f204c5 commit 169df5b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ private void setAccount(@Nullable CosmosDBAccount account) {
manager.runOnPooledThread(() -> {
this.connectionString = Optional.ofNullable(account).map(CosmosDBAccount::getCosmosDBAccountPrimaryConnectionString).orElse(null);
manager.runLater(() -> {
final boolean fromExplorer = Objects.nonNull(interchange.getProperty(KEY_FROM_AZURE_EXPLORER));
interchange.putProperty(KEY_FROM_AZURE_EXPLORER, null);
interchange.putProperty(KEY_COSMOS_ACCOUNT_ID, Optional.ofNullable(newAccountId).orElse(NONE));
if (Objects.isNull(account) || Objects.isNull(connectionString) || StringUtils.equalsIgnoreCase(oldAccountId, newAccountId)) {
if (Objects.isNull(account) || Objects.isNull(connectionString) || StringUtils.equalsIgnoreCase(oldAccountId, newAccountId) && !fromExplorer) {
this.updating = false;
return;
}
Expand Down

0 comments on commit 169df5b

Please sign in to comment.