Merge pull request 'Development' (#120) from Development into master

Merging B2023-094 from development into master after successful testing.
This commit is contained in:
Devin Jankowski 2023-09-22 13:24:17 -04:00
commit e519dc9a57

View File

@ -367,8 +367,8 @@ namespace Volian.Controls.Library
{ {
rtnstr = rodbidPrefix + string.Format("{0}", chld.roid); rtnstr = rodbidPrefix + string.Format("{0}", chld.roid);
if (rtnstr.Length == 12) rtnstr += "0000"; // last four digits are used for multiple return values if (rtnstr.Length == 12) rtnstr += "0000"; // last four digits are used for multiple return values
// B2023-094: Don't crash when trying to add another ro if it has same key. Note that this is coming in as an RO but is really a group.
AccIDROIDdic.Add(keystr, rtnstr); if (!AccIDROIDdic.ContainsKey(keystr))AccIDROIDdic.Add(keystr, rtnstr);
} }
else if (!cbxROUsage.Checked && chld.children[0].ParentID == 0) else if (!cbxROUsage.Checked && chld.children[0].ParentID == 0)
{ {
@ -789,7 +789,11 @@ namespace Volian.Controls.Library
// B2023-028: RO report generates report with error when RO path not set. Return if datafile is not set // B2023-028: RO report generates report with error when RO path not set. Return if datafile is not set
// by BuildRODataFile // by BuildRODataFile
if (roDataFile == null || roDataFile == "") return; if (roDataFile == null || roDataFile == "")
{
Cursor = curcur; // B2023-094: restore cursor (was wait). Not part of bug, found during fix
return;
}
if (Mydocversion != null) if (Mydocversion != null)
OnPrintRequest(new DisplayReportsEventArgs("Complete RO Report", "Complete RO Report", roDataFile, MyROFSTLookup, cbxComplete.Checked, Mydocversion.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, cbxIncldMissingROs.Checked, paperSize)); OnPrintRequest(new DisplayReportsEventArgs("Complete RO Report", "Complete RO Report", roDataFile, MyROFSTLookup, cbxComplete.Checked, Mydocversion.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, cbxIncldMissingROs.Checked, paperSize));
@ -1064,7 +1068,8 @@ namespace Volian.Controls.Library
// Ignore: Junk Scenario // Ignore: Junk Scenario
continue; continue;
} }
else if (chld[i].value == null && (cbxROUsage.Checked || (chld[i].children != null && chld[i].children[0].ParentID != 0))) // B2023-094: don't crash if chld[i].children count is 0, signals an empty group
else if (chld[i].value == null && (cbxROUsage.Checked || (chld[i].children != null && chld[i].children.Length > 0 && chld[i].children[0].ParentID != 0)))
{ {
tmp = new DevComponents.AdvTree.Node(); tmp = new DevComponents.AdvTree.Node();
tmp.Text = chld[i].title; tmp.Text = chld[i].title;