B2020-004: Enhanced flag ‘allowmods’ caused crash on open of non-enhanced procedure after version properties change
This commit is contained in:
@@ -229,6 +229,9 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
}
|
||||
// B2020-004: only set allowmods if this is an enhanced:
|
||||
bool isEnhanced = (_DocVersionConfig.MyEnhancedDocuments != null && _DocVersionConfig.MyEnhancedDocuments.Count == 1 && _DocVersionConfig.MyEnhancedDocuments[0].Type == 0);
|
||||
if (isEnhanced) _DocVersionConfig.Enhanced_AllowMods = ppChbxEnhancedAllowMods.Checked;
|
||||
_DocVersionConfig.SaveDVEnhancedDocuments();
|
||||
}
|
||||
|
||||
@@ -243,7 +246,6 @@ namespace VEPROMS
|
||||
_DocVersionConfig.Print_MergedPdfsPageNumLocY = float.Parse(tbxMOSyloc.Text);
|
||||
_DocVersionConfig.Print_MergedPdfsPageNumCorner = (MergedPdfsPageNumCorner)ppCmbxMOScornerLoc.SelectedIndex;
|
||||
_DocVersionConfig.Print_MergedPdfsViewAfter = ppChbxMOSview.Checked;
|
||||
_DocVersionConfig.Enhanced_AllowMods = ppChbxEnhancedAllowMods.Checked; // C2019-045: allow modification of enhanced procedure num/title
|
||||
|
||||
//docVersionConfigBindingSource.EndEdit();
|
||||
// Save Default settings for User
|
||||
@@ -547,7 +549,6 @@ namespace VEPROMS
|
||||
else
|
||||
ppCmbxMOSfontName.SelectedValue = _DocVersionConfig.Print_MergedPdfsPageNumFont;
|
||||
ppChbxMOSview.Checked = _DocVersionConfig.Print_MergedPdfsViewAfter;
|
||||
ppChbxEnhancedAllowMods.Checked = _DocVersionConfig.Enhanced_AllowMods;
|
||||
|
||||
_Initializing = false;
|
||||
}
|
||||
@@ -604,6 +605,7 @@ namespace VEPROMS
|
||||
// isEnhanced is an already existing enhanced document. Only allow the user to change the Pdf settings:
|
||||
if (isEnhanced)
|
||||
{
|
||||
ppChbxEnhancedAllowMods.Checked = _DocVersionConfig.Enhanced_AllowMods; // B2020-004: allowmods only if this is an enhanced
|
||||
_Enhanced = new List<EnhancedMiniConfig>();
|
||||
// only display the data from the config setting. And only allow modify of PdfID and PdfXoffset
|
||||
lbEnhanced.Visible = false;
|
||||
|
Reference in New Issue
Block a user