B2017-016 – Handle when format selected from the dropdown happens to be the default format
This commit is contained in:
		@@ -721,16 +721,19 @@ 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)
 | 
			
		||||
			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
 | 
			
		||||
			if (!ValidPlantFormat(pf))
 | 
			
		||||
			if (ppCmbxFormat.SelectedIndex > -1)  // B2017-016 selectedindex of -1 means the default format was selected
 | 
			
		||||
			{
 | 
			
		||||
				_Initializing = true;
 | 
			
		||||
				ppCmbxFormat.SelectedIndex = _InitialIndex; // reset the format selection to what it was
 | 
			
		||||
				ppBtnCancel.Focus(); // this will force the property page to refresh
 | 
			
		||||
				_Initializing = false;
 | 
			
		||||
				return;
 | 
			
		||||
				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
 | 
			
		||||
				if (!ValidPlantFormat(pf))
 | 
			
		||||
				{
 | 
			
		||||
					_Initializing = true;
 | 
			
		||||
					ppCmbxFormat.SelectedIndex = _InitialIndex; // reset the format selection to what it was
 | 
			
		||||
					ppBtnCancel.Focus(); // this will force the property page to refresh
 | 
			
		||||
					_Initializing = false;
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			if ((ppCmbxFormat.SelectedIndex != -1) && _DefaultFormatName != null && _DefaultFormatName.Equals(ppCmbxFormat.SelectedValue))
 | 
			
		||||
			{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user