fix options not getting set and aggregates not getting unchecked (#6675)

This commit is contained in:
Kim Santiago
2019-08-09 14:13:48 -07:00
committed by GitHub
parent 70269a3890
commit edeab906bc

View File

@@ -8,6 +8,7 @@ import * as nls from 'vscode-nls';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { SchemaCompareMainWindow } from '../schemaCompareMainWindow';
import { isNullOrUndefined } from 'util';
const localize = nls.loadMessageBundle();
@@ -445,10 +446,11 @@ export class SchemaCompareOptionsDialog {
protected async execute() {
this.SetDeploymentOptions();
this.SetObjectTypeOptions();
this.schemaComparison.setDeploymentOptions(this.deploymentOptions);
if (this.optionsChanged) {
vscode.window.showWarningMessage(SchemaCompareOptionsDialog.OptionsChangedMessage, SchemaCompareOptionsDialog.YesButtonText, SchemaCompareOptionsDialog.NoButtonText).then((result) => {
if (result === SchemaCompareOptionsDialog.YesButtonText) {
this.schemaComparison.setDeploymentOptions(this.deploymentOptions);
this.schemaComparison.startCompare();
}
});
@@ -1107,7 +1109,7 @@ export class SchemaCompareOptionsDialog {
private GetSchemaCompareIncludedObjectsUtil(label): boolean {
switch (label) {
case SchemaCompareOptionsDialog.Aggregates:
return (this.deploymentOptions.excludeObjectTypes.find(x => x === azdata.SchemaObjectType.Aggregates)) ? false : true;
return !isNullOrUndefined(this.deploymentOptions.excludeObjectTypes.find(x => x === azdata.SchemaObjectType.Aggregates)) ? false : true;
case SchemaCompareOptionsDialog.ApplicationRoles:
return (this.deploymentOptions.excludeObjectTypes.find(x => x === azdata.SchemaObjectType.ApplicationRoles)) ? false : true;
case SchemaCompareOptionsDialog.Assemblies: