From 767fbc8a7fc22a12c2d1fab97fda68f143def45e Mon Sep 17 00:00:00 2001 From: Rich Date: Mon, 23 May 2016 12:38:15 +0000 Subject: [PATCH] B2016-134 The logic used to position steps was using the parent location rather than the previous step. This was causing steps to overlap in the edit window. The Drag Indicator for Folders and Procedures was being shown as red for after the selected item or blue for after the selected item. This was just causing confusion in the manual, so the color was changed to always be red. The message "No Section Content" for an empty section (A Section with no steps) was printing overtop of the text of previous steps when the sections were set to print continuously. The code was changed to only show this message if the pagination for the section was set to separate. Somehow, about 13 sub-steps have Grid records in the Wolf Creek data. These items were AND steps, Explicit OR steps and Paragraphs. They printed the grid with a Tab (small letter "o"). The code was changed so that Grids do not print the Tab. --- PROMS/Volian.Controls.Library/EditItem.cs | 13 +++++++++---- PROMS/Volian.Controls.Library/vlnTreeView.cs | 5 +++-- PROMS/Volian.Print.Library/PromsPrinter.cs | 7 ++++++- PROMS/Volian.Print.Library/vlnTab.cs | 2 ++ 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index 581a7fc0..7f96f8e8 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -2509,11 +2509,16 @@ namespace Volian.Controls.Library else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextRight") ItemLocation = new Point(_MyParentEditItem.ItemLocation.X + _MyParentEditItem.ItemWidth, _MyParentEditItem.ItemLocation.Y); else if (MyItemInfo.MyTab.Offset != 0) - ContentLocation = new Point(_MyParentEditItem.ContentLocation.X+10, _MyParentEditItem.Bottom); - //ItemLocation = new Point(_MyParentEditItem.ItemLocation.X+10, _MyParentEditItem.Bottom); + ContentLocation = new Point(_MyParentEditItem.ContentLocation.X + 10, _MyParentEditItem.Bottom); + //ItemLocation = new Point(_MyParentEditItem.ItemLocation.X+10, _MyParentEditItem.Bottom); else - ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom); - + { + // B2016-134 Fix - If a previous step exists, use it to locate the current step + if (_MyPreviousEditItem != null) + ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyPreviousEditItem.Bottom); + else + ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom); + } bool specialTplSupport =((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd) || (MyItemInfo.MyDocStyle.LandscapePageList && MyItemInfo.MyDocStyle.ComponentList); bool wecTplSupport = ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_ChklstEditSize) == E_DocStructStyle.DSS_ChklstEditSize); diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index f543853f..ae0decd7 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -3274,8 +3274,9 @@ namespace Volian.Controls.Library return; } //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("Line at {0} Node {1}[{2}] {3}", _location, _dropNode.Text, _index, _position.ToString()); - Color lc = (_position == DropPosition.After ? Color.Red : Color.Blue); - Brush lb = (_position == DropPosition.After ? Brushes.Red : Brushes.Blue); + // Changed the color of the drag indicator to always be red + Color lc = (_position == DropPosition.After ? Color.Red : Color.Red); + Brush lb = (_position == DropPosition.After ? Brushes.Red : Brushes.Red); Point[] RightTriangle; if (_position == DropPosition.After) { diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 1acd04f7..cf0e94a8 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -1556,7 +1556,12 @@ namespace Volian.Print.Library _MyHelper.MyContActSteps.Add(myParagraph.MyContAct); // add this step to the Continuous Action Summary } else if (!myItemInfo.MyDocStyle.OptionalSectionContent) - PrintTextMessage(cb, "No Section Content", _TextLayer); + { + SectionInfo si = myItemInfo.ActiveSection as SectionInfo; + if(si.IsSeparatePagination()) // Don't output this message for continuous sections + // This was causing overlap of this message with previous sections + PrintTextMessage(cb, "No Section Content", _TextLayer); + } SectionConfig.SectionPagination sp = SectionConfig.SectionPagination.Separate; // always the default ItemInfo nxtItem = section.NextItem; if (nxtItem != null) diff --git a/PROMS/Volian.Print.Library/vlnTab.cs b/PROMS/Volian.Print.Library/vlnTab.cs index 325c3f74..d8329885 100644 --- a/PROMS/Volian.Print.Library/vlnTab.cs +++ b/PROMS/Volian.Print.Library/vlnTab.cs @@ -334,6 +334,8 @@ namespace Volian.Print.Library } public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin) { + // Don't print a Tab if the text contains a Grid + if (MyParent.MyItemInfo.MyContent.MyGrid != null) return yPageStart; if (MyParent.MyItemInfo.FormatStepData != null && MyParent.MyItemInfo.FormatStepData.StepPrintData != null) XOffset += (float)(MyParent.MyItemInfo.FormatStepData.StepPrintData.PosAdjust ?? 0); float yLocation = CalculateYOffset(yPageStart, yTopMargin);