Merge in fixes (8/4 & 8/5/2020) for: C2020-031: clarify dialog caption for export of approved procedure
B2020-103: crash on null reference when cancel from create new section
This commit is contained in:
parent
5c4cedf50a
commit
8733418b4e
@ -1280,7 +1280,7 @@ namespace Volian.Controls.Library
|
|||||||
if (!di.Exists) di.Create();
|
if (!di.Exists) di.Create();
|
||||||
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") +"_" + xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_") + ".pxml";
|
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") +"_" + xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_") + ".pxml";
|
||||||
xd.Save(fileName);
|
xd.Save(fileName);
|
||||||
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Saving TempMod", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApprovedRevision_Click(object sender, EventArgs e)
|
void ApprovedRevision_Click(object sender, EventArgs e)
|
||||||
@ -2807,7 +2807,7 @@ namespace Volian.Controls.Library
|
|||||||
// B2020-087 the config for SubSection_Edit was sometimes set even when there wasn't any subsections,
|
// B2020-087 the config for SubSection_Edit was sometimes set even when there wasn't any subsections,
|
||||||
// so make sure it's cleared if there are no existing subsections
|
// so make sure it's cleared if there are no existing subsections
|
||||||
SectionConfig sc = _LastItemInfo.MyConfig as SectionConfig;
|
SectionConfig sc = _LastItemInfo.MyConfig as SectionConfig;
|
||||||
if (sc.SubSection_Edit == "Y" && _LastItemInfo.Sections == null)
|
if (sc != null && sc.SubSection_Edit == "Y" && _LastItemInfo.Sections == null)
|
||||||
{
|
{
|
||||||
sc.SubSection_Edit = null;
|
sc.SubSection_Edit = null;
|
||||||
using (Section mysect = Section.Get(_LastItemInfo.ItemID))
|
using (Section mysect = Section.Get(_LastItemInfo.ItemID))
|
||||||
@ -3208,7 +3208,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
// B2020-087 if we deleted the last sub section, then clear the SubSection_Edit in the parent's config
|
// B2020-087 if we deleted the last sub section, then clear the SubSection_Edit in the parent's config
|
||||||
SectionConfig sc = pii.MyConfig as SectionConfig;
|
SectionConfig sc = pii.MyConfig as SectionConfig;
|
||||||
if (sc.SubSection_Edit == "Y" && pii.Sections == null)
|
if (sc != null && sc.SubSection_Edit == "Y" && pii.Sections == null) // B2020-103: Added null check
|
||||||
{
|
{
|
||||||
sc.SubSection_Edit = null;
|
sc.SubSection_Edit = null;
|
||||||
using (Section mysect = Section.Get(pii.ItemID))
|
using (Section mysect = Section.Get(pii.ItemID))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user