From 9b5bf56acae8fa4788df58345f31d388202413b6 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 11 Feb 2014 22:08:10 +0000 Subject: [PATCH] Fixed a null reference issue when a procedure set does not have an RO path set. Fixed a printing issue with Catawba AP data where Notes and Cautions on high level RNOs started printing too high --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 8 +++++--- PROMS/Volian.Print.Library/vlnParagraph.cs | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 39ee1400..83f6b0fc 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1878,7 +1878,8 @@ namespace VEPROMS } SetCaption(tv.SelectedNode as VETreeNode); displayApplicability.MyDisplayTabItem = tc.SelectedDisplayTabItem; - displayRO.MyROFSTLookup = tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion); + if (tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociationCount > 0) + displayRO.MyROFSTLookup = tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion); lblUser.Text = tc.SelectedDisplayTabItem.MyUserRole; if (tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion.MultiUnitCount > 1) btnPrint.Visible = false; @@ -1951,7 +1952,8 @@ namespace VEPROMS infotabTags.Visible = true; if (_LastStepRTB != null) { - infotabRO.Visible = infotabTransition.Visible = true; + infotabRO.Visible = _LastStepRTB.MyItemInfo.MyDocVersion.DocVersionAssociationCount > 0; + infotabTransition.Visible = true; displayRO.Enabled = _LastStepRTB.EditMode || _LastStepRTB.IsRoTable; displayTransition.Enabled = _LastStepRTB.EditMode; } @@ -2416,7 +2418,7 @@ namespace VEPROMS // if our active tab is a Word attachment, call the Click even on the RO tab // to ensure that the RO FST is loaded. This fixes a bug where if the first thing you // open is a Word attachment, the RO panel would not have the RO's listed. - if (infoPanel.Expanded && _CurrentItem != null && _CurrentItem.HasWordContent) + if (infoPanel.Expanded && _CurrentItem != null && _CurrentItem.HasWordContent && infotabRO.Visible) infotabRO_Click(sender, e); } #endregion diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index c09b64f1..e537c687 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1913,9 +1913,12 @@ namespace Volian.Print.Library yOffRight = ChildrenRight.Add(cb, itemInfo.RNOs, XOffset + RnoOffset, YTop, YTop, rnoLevel + 1, maxRNO, formatInfo); if (ChildrenRight[0].ChildrenAbove.Count > 0) { + float adj = ChildrenRight[0].YOffset - YOffset; YOffset = ChildrenRight[0].YOffset; + yoff += adj; if (MyTab != null) MyTab.YOffset = ChildrenRight[0].YOffset; if (PartsRight.Count > 0) PartsRight[0].YOffset = ChildrenRight[0].YOffset; + YTopMost = ChildrenRight[0].ChildrenAbove[0].YOffset; } } // Need code to determine if the table will overlap the Right Column if it does then