B2016-037: Cut text with referenced objects removes text (actually ‘cleans’ any content text that has ‘<NewID>’ in it

This commit is contained in:
2016-03-02 13:36:55 +00:00
parent 4dfddeecb4
commit d874371f44
2 changed files with 30 additions and 4 deletions

View File

@@ -2722,6 +2722,16 @@ namespace Volian.Controls.Library
TabFont = itemInfo.MyTab.MyFont.WindowsFont;
break;
case 2: // Steps
// Fix for B2016-037: there were '<NewID>'s in saved content text. This was caused by a bug in code that
// did not resolve these correctly if there was more than 1 in the text. So if, when loading the text, this
// is found, resolve them:
if (itemInfo.MyContent.Text.Contains("<NewID>"))
{
DisplayText vlntxt = new DisplayText(itemInfo, E_EditPrintMode.Edit, E_ViewMode.Edit, false, E_FieldToEdit.StepText, true, null, null, false);
vlntxt.SetDTS = false;
vlntxt.CleanUpNewIDs();
vlntxt = null;
}
ContentFont = myStepPanel.StepFont;//lblTab.Font = myStepPanel.StepFont;
if (itemInfo.MyTab != null ) TabFont = itemInfo.MyTab.MyFont.WindowsFont;
MyStepData = itemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[ContentType % 10000];