B2021-028: During print, removal of trailing spaces and newlines causes missing line in print of empty steps
This commit is contained in:
@@ -315,28 +315,6 @@ namespace VEPROMS.CSLA.Library
|
||||
OnPropertyChanged("Step_PreferredPagebreak");
|
||||
}
|
||||
}
|
||||
// C2021-010: Remove trailing returns/spaces & manual page breaks & allow save.
|
||||
// EmptyStep was added to make printing consistent after saving of trailing newlines/spaces.
|
||||
// The print code was printing an empty string rather than a space. But a space gets saved since
|
||||
// without it the step is deleted.
|
||||
public bool Step_EmptyStep
|
||||
{
|
||||
get
|
||||
{
|
||||
string s = _Xp["Step", "EmptyStep"];
|
||||
|
||||
if (s == string.Empty) return false;
|
||||
if (s == "True") return true;
|
||||
return false;
|
||||
}
|
||||
set
|
||||
{
|
||||
string s = _Xp["Step", "EmptyStep"];
|
||||
if (value.ToString() == s) return;
|
||||
_Xp["Step", "EmptyStep"] = value.ToString();
|
||||
OnPropertyChanged("Step_EmptyStep");
|
||||
}
|
||||
}
|
||||
//[Category("Step Attributes")]
|
||||
//[DisplayName("Step Change Bar Override")]
|
||||
//[RefreshProperties(RefreshProperties.All)]
|
||||
|
@@ -142,15 +142,13 @@ namespace VEPROMS.CSLA.Library
|
||||
// No 'true' change occurred if trailing space was after an rtf command
|
||||
if (!OriginalText.EndsWith(@"\b0") && !OriginalText.EndsWith(@"\i0") && !OriginalText.EndsWith(@"\ulnone") &&
|
||||
!OriginalText.EndsWith(@"\up0") && !OriginalText.EndsWith(@"\dn0"))
|
||||
{
|
||||
RemoveTrailingBlankID = itemInfo.ItemID;
|
||||
if (OriginalText == "") OriginalText = " "; // B2021-028: don't make step empty, print with a space
|
||||
}
|
||||
else
|
||||
OriginalText = InfoText;
|
||||
}
|
||||
if (epMode == E_EditPrintMode.Print && !RemoveTrailingHardReturnAndManualPageBreaks) // if step was made empty from previous print & not removing now, text is an empty string
|
||||
{
|
||||
StepConfig sc = itemInfo.MyConfig as StepConfig;
|
||||
if (sc != null && sc.Step_EmptyStep) OriginalText = "";
|
||||
}
|
||||
//OriginalText = InfoText;
|
||||
//if (OriginalText != InfoText) Console.WriteLine("ItemId = {0}, {1}", itemInfo.ItemID, OriginalText.Length-InfoText.Length);
|
||||
if (OriginalText.Contains("Prerequisite") && epMode == E_EditPrintMode.Print)
|
||||
|
Reference in New Issue
Block a user