From 10c5c625c24debdfdf91d217bd1832afcd79d2bb Mon Sep 17 00:00:00 2001 From: Ariel Rorabaugh Date: Fri, 15 May 2026 11:52:13 -0400 Subject: [PATCH] Move numbering style fix to the get method Numbering style was still displaying incorrectly in the preview window of the configuration dialog. Making the change in the get method instead fixes the issue in all locations. Change-Id: I630c5fe4acacae85327f37c4f1b2f69eb96ade75 --- Src/xWorks/DictionaryConfigurationController.cs | 4 ---- Src/xWorks/DictionaryDetailsView/SenseOptionsView.cs | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Src/xWorks/DictionaryConfigurationController.cs b/Src/xWorks/DictionaryConfigurationController.cs index d0d9a0f224..6639bc1373 100644 --- a/Src/xWorks/DictionaryConfigurationController.cs +++ b/Src/xWorks/DictionaryConfigurationController.cs @@ -520,10 +520,6 @@ public static void SetConfigureHomographParameters(DictionaryConfigurationModel var senseNode = mainEntryNode.Children.Where(prop => prop.Label == senseType).FirstOrDefault(); if (senseNode == null) return; var senseOptions = (DictionaryNodeSenseOptions)senseNode.DictionaryNodeOptions; - if (String.IsNullOrEmpty(senseOptions.NumberingStyle)) - { - senseOptions.NumberingStyle = null; - } cacheHc.ksSenseNumberStyle = senseOptions.NumberingStyle; //SubSense Node var subSenseNode = senseNode.Children.Where(prop => prop.Label == "Subsenses").FirstOrDefault(); diff --git a/Src/xWorks/DictionaryDetailsView/SenseOptionsView.cs b/Src/xWorks/DictionaryDetailsView/SenseOptionsView.cs index ca937629a2..3a9300c717 100644 --- a/Src/xWorks/DictionaryDetailsView/SenseOptionsView.cs +++ b/Src/xWorks/DictionaryDetailsView/SenseOptionsView.cs @@ -64,7 +64,13 @@ internal List NumberingStyles public string NumberingStyle { - get{ return ((NumberingStyleComboItem)dropDownNumberingStyle.SelectedItem).FormatString; } + get + { + // Return null if string is empty, because returning an empty string for reversal numbers + // also forces sense numbers not to be displayed. Null doesn't cause the same problem. + var formatString = ((NumberingStyleComboItem)dropDownNumberingStyle.SelectedItem).FormatString; + return string.IsNullOrEmpty(formatString) ? null : formatString; + } set { if (string.IsNullOrEmpty(value))