From 52f71e8b79c5cd5024f229bc39f1a0fd64199a2b Mon Sep 17 00:00:00 2001 From: Hai Cao Date: Mon, 11 Apr 2022 10:10:16 -0700 Subject: [PATCH] [Table Designer] fix check for isPkDescEnabled (#1460) --- .../TableDesigner/TableDesignerService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs b/src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs index 3773bf5e..a9601f06 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/TableDesigner/TableDesignerService.cs @@ -718,11 +718,11 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner var primaryKey = table.PrimaryKey; tableViewModel.PrimaryKeyName.Enabled = primaryKey != null; tableViewModel.PrimaryKeyIsClustered.Enabled = primaryKey != null; + tableViewModel.PrimaryKeyDescription.Enabled = primaryKey != null && primaryKey.CanEditDescription; if (primaryKey != null) { tableViewModel.PrimaryKeyName.Value = primaryKey.Name; tableViewModel.PrimaryKeyDescription.Value = primaryKey.Description; - tableViewModel.PrimaryKeyDescription.Enabled = primaryKey.CanEditDescription; tableViewModel.PrimaryKeyIsClustered.Checked = primaryKey.IsClustered; foreach (var cs in primaryKey.Columns) {