diff options
Diffstat (limited to 'src/WixToolset.Core/Compiler_UI.cs')
-rw-r--r-- | src/WixToolset.Core/Compiler_UI.cs | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/WixToolset.Core/Compiler_UI.cs b/src/WixToolset.Core/Compiler_UI.cs index 8a425fd4..60e89d12 100644 --- a/src/WixToolset.Core/Compiler_UI.cs +++ b/src/WixToolset.Core/Compiler_UI.cs | |||
@@ -465,12 +465,12 @@ namespace WixToolset.Core | |||
465 | { | 465 | { |
466 | case "Control": | 466 | case "Control": |
467 | // These are all thrown away. | 467 | // These are all thrown away. |
468 | IntermediateTuple lastTabRow = null; | 468 | ControlTuple lastTabTuple = null; |
469 | string firstControl = null; | 469 | string firstControl = null; |
470 | string defaultControl = null; | 470 | string defaultControl = null; |
471 | string cancelControl = null; | 471 | string cancelControl = null; |
472 | 472 | ||
473 | this.ParseControlElement(child, id.Id, TupleDefinitionType.BBControl, ref lastTabRow, ref firstControl, ref defaultControl, ref cancelControl); | 473 | this.ParseControlElement(child, id.Id, TupleDefinitionType.BBControl, ref lastTabTuple, ref firstControl, ref defaultControl, ref cancelControl); |
474 | break; | 474 | break; |
475 | default: | 475 | default: |
476 | this.Core.UnexpectedElement(node, child); | 476 | this.Core.UnexpectedElement(node, child); |
@@ -954,7 +954,7 @@ namespace WixToolset.Core | |||
954 | id = Identifier.Invalid; | 954 | id = Identifier.Invalid; |
955 | } | 955 | } |
956 | 956 | ||
957 | IntermediateTuple lastTabRow = null; | 957 | ControlTuple lastTabTuple = null; |
958 | string cancelControl = null; | 958 | string cancelControl = null; |
959 | string defaultControl = null; | 959 | string defaultControl = null; |
960 | string firstControl = null; | 960 | string firstControl = null; |
@@ -966,7 +966,7 @@ namespace WixToolset.Core | |||
966 | switch (child.Name.LocalName) | 966 | switch (child.Name.LocalName) |
967 | { | 967 | { |
968 | case "Control": | 968 | case "Control": |
969 | this.ParseControlElement(child, id.Id, TupleDefinitionType.Control, ref lastTabRow, ref firstControl, ref defaultControl, ref cancelControl); | 969 | this.ParseControlElement(child, id.Id, TupleDefinitionType.Control, ref lastTabTuple, ref firstControl, ref defaultControl, ref cancelControl); |
970 | break; | 970 | break; |
971 | default: | 971 | default: |
972 | this.Core.UnexpectedElement(node, child); | 972 | this.Core.UnexpectedElement(node, child); |
@@ -979,11 +979,11 @@ namespace WixToolset.Core | |||
979 | } | 979 | } |
980 | } | 980 | } |
981 | 981 | ||
982 | if (null != lastTabRow && null != lastTabRow[1]) | 982 | if (null != lastTabTuple && null != lastTabTuple.Control) |
983 | { | 983 | { |
984 | if (firstControl != lastTabRow[1].ToString()) | 984 | if (firstControl != lastTabTuple.Control) |
985 | { | 985 | { |
986 | lastTabRow.Set(10, firstControl); | 986 | lastTabTuple.NextControlRef = firstControl; |
987 | } | 987 | } |
988 | } | 988 | } |
989 | 989 | ||
@@ -1027,12 +1027,12 @@ namespace WixToolset.Core | |||
1027 | /// <param name="node">Element to parse.</param> | 1027 | /// <param name="node">Element to parse.</param> |
1028 | /// <param name="dialog">Identifier for parent dialog.</param> | 1028 | /// <param name="dialog">Identifier for parent dialog.</param> |
1029 | /// <param name="table">Table control belongs in.</param> | 1029 | /// <param name="table">Table control belongs in.</param> |
1030 | /// <param name="lastTabTuple">Last row in the tab order.</param> | 1030 | /// <param name="lastTabTuple">Last control in the tab order.</param> |
1031 | /// <param name="firstControl">Name of the first control in the tab order.</param> | 1031 | /// <param name="firstControl">Name of the first control in the tab order.</param> |
1032 | /// <param name="defaultControl">Name of the default control.</param> | 1032 | /// <param name="defaultControl">Name of the default control.</param> |
1033 | /// <param name="cancelControl">Name of the candle control.</param> | 1033 | /// <param name="cancelControl">Name of the candle control.</param> |
1034 | /// <param name="trackDiskSpace">True if the containing dialog tracks disk space.</param> | 1034 | /// <param name="trackDiskSpace">True if the containing dialog tracks disk space.</param> |
1035 | private void ParseControlElement(XElement node, string dialog, TupleDefinitionType tupleType, ref IntermediateTuple lastTabTuple, ref string firstControl, ref string defaultControl, ref string cancelControl) | 1035 | private void ParseControlElement(XElement node, string dialog, TupleDefinitionType tupleType, ref ControlTuple lastTabTuple, ref string firstControl, ref string defaultControl, ref string cancelControl) |
1036 | { | 1036 | { |
1037 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 1037 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); |
1038 | Identifier controlId = null; | 1038 | Identifier controlId = null; |
@@ -1529,7 +1529,15 @@ namespace WixToolset.Core | |||
1529 | 1529 | ||
1530 | if (!notTabbable) | 1530 | if (!notTabbable) |
1531 | { | 1531 | { |
1532 | if (TupleDefinitionType.BBControl == tupleType) | 1532 | if (tuple is ControlTuple controlTuple) |
1533 | { | ||
1534 | if (null != lastTabTuple) | ||
1535 | { | ||
1536 | lastTabTuple.NextControlRef = controlTuple.Control; | ||
1537 | } | ||
1538 | lastTabTuple = controlTuple; | ||
1539 | } | ||
1540 | else if (tuple != null) | ||
1533 | { | 1541 | { |
1534 | this.Core.Write(ErrorMessages.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType)); | 1542 | this.Core.Write(ErrorMessages.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType)); |
1535 | } | 1543 | } |
@@ -1538,12 +1546,6 @@ namespace WixToolset.Core | |||
1538 | { | 1546 | { |
1539 | firstControl = controlId.Id; | 1547 | firstControl = controlId.Id; |
1540 | } | 1548 | } |
1541 | |||
1542 | if (null != lastTabTuple) | ||
1543 | { | ||
1544 | lastTabTuple.Set(10, controlId.Id); | ||
1545 | } | ||
1546 | lastTabTuple = tuple; | ||
1547 | } | 1549 | } |
1548 | 1550 | ||
1549 | // bitmap and icon controls contain a foreign key into the binary table in the text column; | 1551 | // bitmap and icon controls contain a foreign key into the binary table in the text column; |