B2018-025: Proms crashes opening Working Draft if associated enhanced Working Draft had been deleted
This commit is contained in:
@@ -2950,7 +2950,23 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
foreach (DVEnhancedDocument dve in dvc.MyEnhancedDocuments)
|
||||
{
|
||||
if (dve.Type != 0) DocVersion.Delete(dve.VersionID);
|
||||
if (dve.Type != 0)
|
||||
DocVersion.Delete(dve.VersionID);
|
||||
else
|
||||
{
|
||||
// B2018-025: for the input source docversion (id), clear out its enhanced document link information
|
||||
// dvi is the source, remove this (_LastDocVersionInfo) background link from the source's config
|
||||
DocVersionInfo dvi = DocVersionInfo.Get(dve.VersionID);
|
||||
DocVersionConfig dvci = dvi.MyConfig as DocVersionConfig;
|
||||
dvci.RemoveEnhancedLink(_LastDocVersionInfo.VersionID);
|
||||
string dvccfg = dvci.ToString();
|
||||
using (DocVersion dv = dvi.Get())
|
||||
{
|
||||
dv.Config = dvccfg;
|
||||
dv.Save();
|
||||
DocVersionInfo.Refresh(dv);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DocVersion.Delete(_LastDocVersionInfo.VersionID);
|
||||
|
Reference in New Issue
Block a user