B2016-282: remove new subsection menu item off of V-Button when selected section is a Word Section

B2016-236: for global search – add ‘Figure’ to Results style as Document Text & change ‘AER’ to ‘Left’ in list of step types for figures.
B2016-282: remove new subsection menu item off of a Word Section from
This commit is contained in:
Kathy Ruffing 2017-01-12 15:23:27 +00:00
parent e6fbb77546
commit 4744bcd450
4 changed files with 19 additions and 5 deletions

View File

@ -3393,15 +3393,21 @@ namespace VEPROMS
}
ButtonItem sbbtn = new ButtonItem("sbbtn", "Section Before");
ButtonItem sabtn = new ButtonItem("sabtn", "Section After");
ButtonItem subbtn = new ButtonItem("subbtn", "SubSection");
btnNew.SubItems.Add(sbbtn);
btnNew.SubItems.Add(sabtn);
btnNew.SubItems.Add(subbtn);
sbbtn.Click += new EventHandler(sbbtn_Click);
sabtn.Click += new EventHandler(sabtn_Click);
subbtn.Click += new EventHandler(subbtn_Click);
if (si.IsStepSection)
{
// B2016-282: Don't allow insert of subsections off Word Section.
if (si.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)
{
ButtonItem subbtn = new ButtonItem("subbtn", "SubSection");
btnNew.SubItems.Add(subbtn);
subbtn.Click += new EventHandler(subbtn_Click);
}
ButtonItem stpbtn = new ButtonItem("stpbtn", "New Step");
btnNew.SubItems.Add(stpbtn);
stpbtn.Click += new EventHandler(stpbtn_Click);

View File

@ -2462,6 +2462,7 @@ namespace VEPROMS.CSLA.Library
get
{
if (IsRtfRaw) return ("Equation");
if (IsFigure) return ("Figure"); // Added for B2016-236
string str = MyContent.Text;
if (MyDocVersion != null)
{

View File

@ -435,7 +435,10 @@ namespace Volian.Controls.Library
}
else
{
newnode = NewAdvTreeNode(sdr.Name, true, true);
// B2016-236: for global search change AER to Left in list of step types for figures
string nameInTree = sdr.Name;
if (sdr.Name.Contains("AER") && sdr.Name.ToUpper().Contains("FIGURE")) nameInTree = nameInTree.Replace("AER", "Left");
newnode = NewAdvTreeNode(nameInTree, true, true);
newnode.Name = sd.Type; // this needed for the FindNodeByName() function
newnode.Tag = sd;

View File

@ -869,7 +869,7 @@ namespace Volian.Controls.Library
cm.MenuItems.Add(string.Format("Document Checked Out to {0}", oi.SessionUserID), new EventHandler(mi_Click));
cm.MenuItems.Add("Insert Section Before", new EventHandler(mi_Click));
cm.MenuItems.Add("Insert Section After", new EventHandler(mi_Click));
if (!si.IsAutoTOCSection)
if (!si.IsAutoTOCSection && si.IsStepSection) // B2016-282: Don't allow insert of subsections off Word Section.
{
bool meta = si.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections;
if (meta) cm.MenuItems.Add("New Subsection", new EventHandler(mi_Click));
@ -2013,7 +2013,9 @@ namespace Volian.Controls.Library
else if (p.IndexOf("After") > -1)
PasteBeforeOrAfter(MenuSelections.StepAfter, tn, iiClipboard.ItemID);
else if (p.IndexOf("Replace") > -1)
{
PasteReplace(tn, iiClipboard.ItemID);
}
else // paste as child
PasteAsChild(tn, iiClipboard.ItemID);
this.Cursor = Cursors.Default;
@ -3691,12 +3693,14 @@ namespace Volian.Controls.Library
}
public VETreeNode RefreshRelatedNode(IVEDrillDownReadOnly selectedItem)
{
Console.WriteLine("vlntreeview:refreshrelatednote:start");
VETreeNode child = FindNode(selectedItem, this.Nodes);
if (child == null) return null;
if (!child.IsExpanded)
child.Expand();
child.ChildrenLoaded = false;
child.RefreshNode();
Console.WriteLine("vlntreeview:refreshrelatednote:end");
return child;
}