B2017-016 – Handle when format selected from the dropdown happens to be the default format

This commit is contained in:
John Jenko 2017-01-26 15:09:35 +00:00
parent 9d6bfa6bf9
commit 728889a637

View File

@ -721,6 +721,8 @@ namespace VEPROMS
return;
}
if (_InitialIndex < -1) _InitialIndex = ppCmbxFormat.SelectedIndex; // save the current format selection (happens here when current section format is not the default section)
if (ppCmbxFormat.SelectedIndex > -1) // B2017-016 selectedindex of -1 means the default format was selected
{
PlantFormat pf = FormatInfoList.SortedFormatInfoList[ppCmbxFormat.SelectedIndex].PlantFormat;
// If the selected format does not have a docstyle compatable with the section
// then reset the format selection back to what it was
@ -732,6 +734,7 @@ namespace VEPROMS
_Initializing = false;
return;
}
}
if ((ppCmbxFormat.SelectedIndex != -1) && _DefaultFormatName != null && _DefaultFormatName.Equals(ppCmbxFormat.SelectedValue))
{
ppBtnDefaultFmt.Focus();