Skip to content

Commit 562ed9d

Browse files
authored
LT-3646: Unchecked checkboxes count as "no data"
When determining field visibility, treat unchecked checkboxes as if they have "no data". Note: This change applies to all checkboxes stored as a Boolean, and one checkbox that is stored as an integer. To apply the new behavior to a checkbox stored as an integer, and avoid changing the behavior of all integer fields, we specifically identify the integer field. There is a possibility that we missed other checkbox fields that are stored as an integer.
1 parent c4cc09d commit 562ed9d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Src/Common/Controls/DetailControls/DataTree.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,6 +2807,15 @@ private NodeTestResult AddSimpleNode(ArrayList path, XmlNode node, ObjSeqHashMap
28072807
if (realSda.get_StringProp(obj.Hvo, flid).Length == 0)
28082808
return NodeTestResult.kntrNothing;
28092809
break;
2810+
case CellarPropertyType.Boolean:
2811+
if (realSda.get_BooleanProp(obj.Hvo, flid) == false)
2812+
return NodeTestResult.kntrNothing;
2813+
break;
2814+
case CellarPropertyType.Integer:
2815+
// 'Show Minor Entry' is displayed as a checkbox.
2816+
if (flid == LexEntryRefTags.kflidHideMinorEntry && realSda.get_IntProp(obj.Hvo, flid) != 0)
2817+
return NodeTestResult.kntrNothing;
2818+
break;
28102819
case CellarPropertyType.Unicode:
28112820
string val = realSda.get_UnicodeProp(obj.Hvo, flid);
28122821
if (string.IsNullOrEmpty(val))

0 commit comments

Comments
 (0)