diff --git a/PROMS/Formats/fmtall/VEGPAlrall.xml b/PROMS/Formats/fmtall/VEGPAlrall.xml index 135f711e..484f088f 100644 Binary files a/PROMS/Formats/fmtall/VEGPAlrall.xml and b/PROMS/Formats/fmtall/VEGPAlrall.xml differ diff --git a/PROMS/Formats/genmacall/VEGPAlr.svg b/PROMS/Formats/genmacall/VEGPAlr.svg index 1ba8a5a7..921e5718 100644 Binary files a/PROMS/Formats/genmacall/VEGPAlr.svg and b/PROMS/Formats/genmacall/VEGPAlr.svg differ diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 139a5b5a..7a44c9ba 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -2001,19 +2001,34 @@ namespace VEPROMS Application.DoEvents(); string formatFileName = (dvi.MyFormat != null) ? dvi.MyFormat.Name : ""; XmlElement xe = xn.OwnerDocument.CreateElement(nodename); + + // B2022-072: if the exported docversion doesn't have the format set, look up folder tree to find the format used + int tmpFormatID = (dvi.FormatID != null) ? (int)dvi.FormatID : 0; + FolderInfo fi = dvi.MyFolder; + while (formatFileName == "" && fi != null) + { + if (fi.FormatID != null && fi.FormatID != 0) + { + formatFileName = (fi.MyFormat != null) ? fi.MyFormat.Name : ""; + tmpFormatID = (fi.FormatID != null) ? (int)fi.FormatID : 0; + break; + } + fi = fi.MyParent; + } xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "versionid", dvi.VersionID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "folderid", dvi.FolderID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "versiontype", dvi.VersionType.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", dvi.Name)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "title", dvi.Title)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "itemid", dvi.ItemID.ToString())); - xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", dvi.FormatID.ToString())); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", tmpFormatID.ToString()));//dvi.FormatID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "config", dvi.Config)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", dvi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", dvi.UserID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatfilename", formatFileName)); xn.AppendChild(xe); if (!ValidDocVersionAssociation(dvi)) return; // bug fix: B2017-082 don't export if no RO Path + if (dvi.DocVersionAssociationCount > 0) foreach (AssociationInfo ai in dvi.DocVersionAssociations) ExportAssociation(xe, ai, "association"); diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index 10ab6520..4eb4ead5 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -796,6 +796,10 @@ namespace Volian.Controls.Library node.Checked = pNode.Checked; CheckTreeNodeChildren(node.Nodes); } + // B2023-112: Clear the docversion list - this flags 'All' when the 'All Proc Sets' tree node is checked and 'None' when it isn't. Then + // Use buildSetToSearchPanelTitle to set the text for how many sets are in search. + lstCheckedDocVersions.Clear(); + buildSetToSearchPanelTitle(); } private void AllSectionTypes_clicked(object sender, EventArgs e) @@ -2392,18 +2396,18 @@ namespace Volian.Controls.Library { if (tn.Checked) { - tn.Style = DevComponents.AdvTree.NodeStyles.Apple; // sets green background on selected folder(s) - FolderInfo fi = (FolderInfo)tn.Tag; - + //tn.Style = DevComponents.AdvTree.NodeStyles.Apple; // sets green background on selected folder(s) + //B2023-112: Don't crash if on top 'All' node (did not have associated folder) + FolderInfo fi = tn.Tag as FolderInfo; // if this folder has a docversion, use its id: if (tn.Nodes != null && tn.Nodes.Count > 0 && tn.Nodes[0].Text != DummyNodeText) // Folder has been expanded, so add its docversion list { - if (fi.FolderDocVersionCount > 0) lstCheckedDocVersions.Add(fi.FolderDocVersions[0]); + if (fi != null && fi.FolderDocVersionCount > 0) lstCheckedDocVersions.Add(fi.FolderDocVersions[0]); } else // it has not been expanded process all below. { //B2023-076: Do not process the "Select All" node - if (tn.Text != SelectAllProcedureSetsText) + if (tn.Text != SelectAllProcedureSetsText && fi != null) AddAllChildVersions(fi); } } @@ -2548,7 +2552,16 @@ namespace Volian.Controls.Library private void buildSetToSearchPanelTitle() { - if (lstCheckedDocVersions.Count == 0) + // B2023-112: lstCheckedDocVersions has list of sets, if 'all' it is empty. However, in order to get proc set tree to handle appropriate selections + // and work with this list, check both the list count and the whether the 'all' is checked. + if (lstCheckedDocVersions.Count == 0 && advTreeProcSets.Nodes != null && (advTreeProcSets.Nodes.Count <=1 || (advTreeProcSets.Nodes.Count > 1 && advTreeProcSets.Nodes[0].Nodes != null)) && (advTreeProcSets.Nodes[0].Nodes.Count == 0 || (advTreeProcSets.Nodes[0].Nodes.Count > 0 && !advTreeProcSets.Nodes[0].Nodes[0].Checked))) + { + xpSetToSearch.TitleText = string.Format("No Procedure Sets Selected"); + xpSetToSearch.TitleStyle.BackColor1.Color = Color.PapayaWhip; + btnSearch.Enabled = false; + tabSearchTypes.Enabled = false; // disable all the search tabs + } + else if (lstCheckedDocVersions.Count == 0) { xpSetToSearch.TitleText = string.Format("All Procedure Sets Selected"); xpSetToSearch.TitleStyle.BackColor1.Color = Color.PapayaWhip; @@ -2577,6 +2590,9 @@ namespace Volian.Controls.Library StartAdvTreeStepTypesFillIn();// B2016-258 Hang after selecting a procedure if the Step Type panel is open on the search panel } } + // B2023-112: If unchecking a procedure set, uncheck the 'All' node also + if (n.Checked) + advTreeProcSets.Nodes[0].Nodes[0].Checked = false; } #endregion @@ -2595,7 +2611,7 @@ namespace Volian.Controls.Library if (n.Checked) { - n.Style = DevComponents.AdvTree.NodeStyles.Apple; + //n.Style = DevComponents.AdvTree.NodeStyles.Apple; // B2023-112: coloring of proc set tree nodes was not working correctly if (sd == null) {