From 99bd83fd14e25f1a976d648f491eda267c6a75c4 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 21 Apr 2011 12:24:59 +0000 Subject: [PATCH] --- PROMS/Volian.Controls.Library/StepRTB.cs | 8 +++++++- PROMS/Volian.Controls.Library/vlnTreeView.cs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index b8acd3da..a16aca45 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -149,6 +149,7 @@ namespace Volian.Controls.Library } #endregion #region Properties and Variables + public bool IsRoTable { get { return (Parent is VlnFlexGrid && (Parent as VlnFlexGrid).IsRoTable); } @@ -376,6 +377,11 @@ namespace Volian.Controls.Library // was confusing the 'handle' of the rtf box. //Console.WriteLine("'font',{0}", Font); //if(Text == "")SelectionFont = Font; // Initialize SelectionFont + if (MyItemInfo != null) + { + if (MyItemInfo.IsStep) Font = MyFontFamily == null ? MyItemInfo.FormatStepData.Font.WindowsFont:new Font(MyFontFamily, MyItemInfo.FormatStepData.Font.WindowsFont.Size, MyItemInfo.FormatStepData.Font.WindowsFont.Style); + else Font = Font = MyFontFamily == null ? MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font.WindowsFont : new Font(MyFontFamily, MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font.WindowsFont.Size, MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font.WindowsFont.Style); + } RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT); ReadOnly = VwMode == E_ViewMode.View || ActiveMode == false; AddRtfText(vlntxt.StartText); @@ -1220,7 +1226,7 @@ namespace Volian.Controls.Library // rtf. FindAllLinks(); } - void StepRTB_ContentsResized(object sender, ContentsResizedEventArgs e) + public void StepRTB_ContentsResized(object sender, ContentsResizedEventArgs e) { ContentsRectangle = e.NewRectangle; } diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 381effb5..e7cd1d82 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -431,7 +431,7 @@ namespace Volian.Controls.Library // insert process. cm.MenuItems.Add("Insert Section Before", new EventHandler(mi_Click)); cm.MenuItems.Add("Insert Section After", new EventHandler(mi_Click)); - cm.MenuItems.Add("New Subsection", new EventHandler(mi_Click)); + if (si.ActiveFormat.PlantFormat.FormatData.SectData.UseMetaSections)cm.MenuItems.Add("New Subsection", new EventHandler(mi_Click)); if (si.IsStepSection) cm.MenuItems.Add("New Step", new EventHandler(mi_Click)); } else if (tn.VEObject as StepInfo != null)