don't reset plant format to a 'selected index' if initializing

This commit is contained in:
Kathy Ruffing 2013-10-24 14:10:59 +00:00
parent 24dfe73886
commit a9ecdbd459

View File

@ -384,7 +384,7 @@ namespace VEPROMS
// selected. If the format is being reset to default, selectedindex=-1. If this is a change, we'll need
// to check that there are enough docstyles to map the selected type of section.
PlantFormat pf = _SectionConfig.MyFormat != null ? _SectionConfig.MyFormat.PlantFormat : _SectionConfig.MyDefaultFormat.PlantFormat;
if (ppCmbxFormat.SelectedIndex >= 0)
if (!_Initializing && ppCmbxFormat.SelectedIndex >= 0)
pf = FormatInfoList.SortedFormatInfoList[ppCmbxFormat.SelectedIndex].PlantFormat;
else if (!_Initializing) // if the format was changed, it may have been set to default.
pf = _SectionConfig.MyDefaultFormat.PlantFormat;