C2016-042: Message to user on creating subsection when section has steps that steps aren’t visible

This commit is contained in:
Kathy Ruffing 2017-01-20 14:35:03 +00:00
parent e459a5aec6
commit 75b71ce40e

View File

@ -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;