diff --git a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs index 557a8a02..ad6a9c90 100644 --- a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs +++ b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEdit.cs @@ -644,7 +644,9 @@ namespace ctlXMLEditLib parentNode = node.SelectSingleNode(parent); // if not found with just the string, search the tree. if (parentNode == null) parentNode = node.SelectSingleNode("*/" + parent); - if (parentNode != null && parentNode.InnerText == tb.Text) + // C2021-026 if the text is grey it's a child field using the parent's value + // we need to clear the child's text box so that it will reset using the new parent's value + if (parentNode != null && (parentNode.InnerText == tb.Text || tb.ForeColor == SystemColors.GrayText)) { tb.Text = ""; break; @@ -776,9 +778,11 @@ namespace ctlXMLEditLib } } } - mysavexml=false; // data has been saved, don't allow it again. DisplayFieldContents((XmlNode) editelem); // to refresh display after saving Parent/Child fields to show default values - return(true); + // B2021-077 we saved the information. set the need to save flags to false + mysavexml = false; // data has been saved, don't allow it again. + dosaveflag = false; + return (true); } return (false); } @@ -1104,7 +1108,7 @@ namespace ctlXMLEditLib } // get the widths and number of all children of this group box & use this to set the size // of the groupbox. - groupbox.Size = new System.Drawing.Size(Math.Max(55,maxChldWidth + 40), screeny - screenySave + 5);//maxxfortext + 40, maxyfortext + 10); + groupbox.Size = new System.Drawing.Size(Math.Max(105,maxChldWidth + 40), screeny - screenySave + 5); // B2021-079 increased the minimum width chldgrphgt = screeny - screenySave + 5; Controls.Add(groupbox); if (pcGrpBox == null)