Changing a step type was causing hyphens (dashes) to be displayed as boxes. This happened during Calvert training. This change corrects this problem.

This commit is contained in:
Rich 2014-06-17 14:06:05 +00:00
parent f9d47b82cb
commit 01913ed0ba

View File

@ -428,7 +428,6 @@ namespace Volian.Controls.Library
//} //}
OrigDisplayText = vlntxt; OrigDisplayText = vlntxt;
// RHM 20101201 - Don't reset the text. Calculate the text and compare it with the existing text in AddRTFText // RHM 20101201 - Don't reset the text. Calculate the text and compare it with the existing text in AddRTFText
//Text = ""; // Initialize text before add text //Text = ""; // Initialize text before add text
// IMPORTANT: SetLineSpacing must be set before Links, otherwise it // IMPORTANT: SetLineSpacing must be set before Links, otherwise it
@ -441,6 +440,7 @@ namespace Volian.Controls.Library
{ {
if (MyItemInfo.IsStep) Font = MyFontFamily == null ? MyItemInfo.FormatStepData.Font.WindowsFont : new Font(MyFontFamily, MyItemInfo.FormatStepData.Font.WindowsFont.Size, MyItemInfo.FormatStepData.Font.WindowsFont.Style); 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); 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);
LastRtf = Rtf;
} }
} }
RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT); RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT);