From 2988ba9b877c843d79d6e302e53505dc169d07c4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 2 Oct 2013 10:41:58 +0000 Subject: [PATCH] RNOs displayed before substeps for enhanced background flag Improved arrowing for backgrounds with RNO before substeps --- PROMS/Volian.Controls.Library/EditItem.cs | 5 ++++- PROMS/Volian.Controls.Library/StepPanel.cs | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index bb58a19a..ce8a2346 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -1782,6 +1782,8 @@ namespace Volian.Controls.Library AddChildAfter(MyItemInfo.Procedures, expand); if (MyItemInfo.RNOs != null && MyItemInfo.RNOLevel < MyItemInfo.ColumnMode) AddChildRNO(MyItemInfo.RNOs, expand); + if (MyItemInfo.RNOs != null && ((MyItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds)) + AddChildAfter(MyItemInfo.RNOs, expand); AddChildAfter(MyItemInfo.Tables, expand); // get the config item for the steps section. there is an 'editable' // flag used in metasections to define whether the steps should print. @@ -1793,7 +1795,8 @@ namespace Volian.Controls.Library bool EditSteps = !hasMetaSubs || (MyItemInfo.MyConfig is SectionConfig && (MyItemInfo.MyConfig as SectionConfig).SubSection_Edit == "Y"); if (EditSteps) AddChildAfter(MyItemInfo.Steps, expand); - if (MyItemInfo.RNOs != null && MyItemInfo.RNOLevel >= MyItemInfo.ColumnMode) + if (MyItemInfo.RNOs != null && MyItemInfo.RNOLevel >= MyItemInfo.ColumnMode && + !((MyItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds)) AddChildRNO(MyItemInfo.RNOs, expand); AddChildAfter(MyItemInfo.Sections, expand); MatchExpanded(); diff --git a/PROMS/Volian.Controls.Library/StepPanel.cs b/PROMS/Volian.Controls.Library/StepPanel.cs index c5ec61db..45bf683d 100644 --- a/PROMS/Volian.Controls.Library/StepPanel.cs +++ b/PROMS/Volian.Controls.Library/StepPanel.cs @@ -918,6 +918,14 @@ namespace Volian.Controls.Library // Arrow down from a Table should look for a Substep if(ii.IsTablePart && (ii.ActiveParent as ItemInfo).Steps != null) return TopPart((ii.ActiveParent as ItemInfo).Steps[0]); + + // if this is enhanced background, the RNO is displayed after the HLS, so check + // for this, arrow down should go to the RNO. If on the RNO, then go to substeps if they exist. + if (((ii.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds)) + { + if (lookAtRNO && ii.RNOs != null) return TopPart(ii.RNOs[0]); + if (ii.IsRNOPart && ii.MyHLS.Steps != null) return TopPart(ii.MyHLS.Steps[0]); + } if (lookAtSub && ii.Tables != null) return TopPart(ii.Tables[0]); if (lookAtSub && ii.Steps != null) return TopPart(ii.Steps[0]); // RNOs: Use PMode (column)