diff --git a/PROMS/Volian.Controls.Library/StepItem.cs b/PROMS/Volian.Controls.Library/StepItem.cs index 848e7619..b821abed 100644 --- a/PROMS/Volian.Controls.Library/StepItem.cs +++ b/PROMS/Volian.Controls.Library/StepItem.cs @@ -126,9 +126,8 @@ namespace Volian.Controls.Library Circle = true; if (_TabFormat == "o ") CheckOff = true; - if ((value.ItemID % 25) == 0) - ChangeBar = true; #endif + ChangeBar = _MyItemInfo.HasChangeBar(); value.MyContent.Changed += new ContentInfoEvent(MyContent_Changed); } } @@ -784,7 +783,7 @@ namespace Volian.Controls.Library _MyStepSectionLayoutData = itemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData; //// TIMING: DisplayItem.TimeIt("CSLARTB _Layout"); if (myParentStepItem != null) - SeqLevel = myParentStepItem.SeqLevel + ((myChildRelation == ChildRelation.After || myChildRelation == ChildRelation.Before) && TemporaryFormat.IsSequential(itemInfo) ? 1 : 0); + SeqLevel = myParentStepItem.SeqLevel + ((myChildRelation == ChildRelation.After || myChildRelation == ChildRelation.Before) && itemInfo.IsSequential ? 1 : 0); //// TIMING: DisplayItem.TimeIt("CSLARTB seqLevel"); MyItemInfo = itemInfo; } diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 2daad47b..561efaf4 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -77,7 +77,7 @@ namespace Volian.Controls.Library BuildSymbolGallery(sl, galleryContainerSymbolsCM3); } SetButtonAndMenuEnabling(); - SetStepButtonAndMenuEnabling(); + _MyLastFormatID = MyItemInfo.ActiveFormat.FormatID; } } @@ -287,9 +287,11 @@ namespace Volian.Controls.Library btnCMEditTran.Enabled = false; btnCMEditRO.Enabled = false; } + SetStepButtonAndMenuEnabling(); } private void SetStepButtonAndMenuEnabling() { + btnInsPgBrk.Checked = false; // see if manual page break - only available on HLS if (MyItemInfo.IsHigh) { @@ -307,6 +309,7 @@ namespace Volian.Controls.Library // if on a procedure or section title, don't allow for insert of ROs or Transitions: // disable buttons. Info panels for ROs and Transitions are made invisible in frmVEPROMS.cs btnInsTrans.Enabled = btnCMTransition.Enabled = btnInsRO.Enabled = btnCMRO.Enabled = false; + this.Refresh(); return; } diff --git a/PROMS/Volian.Controls.Library/TemporaryFormat.cs b/PROMS/Volian.Controls.Library/TemporaryFormat.cs index bfff65a3..8ba9bfcd 100644 --- a/PROMS/Volian.Controls.Library/TemporaryFormat.cs +++ b/PROMS/Volian.Controls.Library/TemporaryFormat.cs @@ -71,7 +71,7 @@ namespace Volian.Controls.Library int typ = (int)myDisplayItem.MyItemInfo.MyContent.Type; if (typ >= 20000) { - if (myDisplayItem.RNOLevel > 0 && IsRNO(myDisplayItem.MyItemInfo)) return ""; + if (myDisplayItem.RNOLevel > 0 && myDisplayItem.MyItemInfo.IsRNO) return ""; // Step 1: Get TabFormat from Format format = _TabFormats[typ % 10000]; if (format == "") @@ -82,45 +82,5 @@ namespace Volian.Controls.Library } return format; } - public static string TabFormat(ItemInfo item, int seqLevel) - { - string format = string.Empty; - if (item != null) - { - if (IsRNO(item)) return ""; - if ((item.MyContent.Type / 10000) == 2) - { - // Step 1: Get TabFormat from Format - format = _TabFormats[((int)item.MyContent.Type) % 10000]; - if (format == "") - { - format = SeqTabFormat[seqLevel]; - } - } - } - return format; - } - // TODO: Move these to ItemExt.cs as properties - public static bool IsHigh(ItemInfo item) - { - // check to see if ActiveParent is a section - if(item.MyContent.Type / 10000 != 2)return false; - ItemInfo parent = (ItemInfo)item.ActiveParent; - if ((parent.MyContent.Type / 10000) == 1) - return true; - return false; - } - public static bool IsSequential(ItemInfo item) - { - //if (IsHigh(item)) return true; - if (((item.MyContent.Type / 10000) == 2) && ((((int)item.MyContent.Type) % 10000) == 0)) return true; - return false; - } - public static bool IsRNO(ItemInfo item) - { - if(item != null) - return ((item.ItemPartCount > 0) && (item.ItemParts[0].PartType == E_FromType.RNO)); - return false; - } } }