From 746a2475041b5ccc35d725d1c9fc840a2cdc7c3c Mon Sep 17 00:00:00 2001 From: John Date: Fri, 13 Aug 2021 18:47:45 +0000 Subject: [PATCH] =?UTF-8?q?B2021-077=20=E2=80=93=20was=20sometimes=20asked?= =?UTF-8?q?=20to=20save=20changes=20after=20clicking=20on=20Save=20button?= =?UTF-8?q?=20B2021-079=20=E2=80=93=20increased=20the=20minimum=20width=20?= =?UTF-8?q?of=20the=20child=20fields=20grouping=20box=20C2021-026=20?= =?UTF-8?q?=E2=80=93=20when=20parent=20value=20changes,=20show=20in=20chil?= =?UTF-8?q?d=20fields=20that=20default=20to=20the=20parent=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LibSource/ctlXMLEditLib/ctlXMLEdit.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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)