From 75b71ce40e8b05d9f56d05003c5cbb730d91ba9b Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 20 Jan 2017 14:35:03 +0000 Subject: [PATCH] =?UTF-8?q?C2016-042:=20Message=20to=20user=20on=20creatin?= =?UTF-8?q?g=20subsection=20when=20section=20has=20steps=20that=20steps=20?= =?UTF-8?q?aren=E2=80=99t=20visible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/vlnTreeView.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 4f7d2f81..4ce8b08a 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -2396,6 +2396,16 @@ namespace Volian.Controls.Library doPseudo = true; else if (SelectedNode.Nodes.Count > 0) { + // if inserting from a section that has steps, but no subsections, prompt user to let them + // know that the steps will not be visible after the subsection insert (C2016-042): + if (_LastItemInfo.Sections == null && _LastItemInfo.Steps != null && _LastItemInfo.Steps.Count > 0) + { + + if (MessageBox.Show(this, "Inserting a subsection at this location will cause the steps of this section to become hidden. After inserting the subsection, you will need exit and re-enter PROMS, then select the Editable Data checkbox on the properties page for the section containing the hidden steps in order for the steps to become visible again. Do you want to continue?", "Subsection Insert", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + { + return; + } + } // Check to see if sections already exist, if so, the pseudo node will too. bool hasMetaSubs = _LastItemInfo.Sections != null && _LastItemInfo.Sections.Count > 0; if (!hasMetaSubs) doPseudo = true;