From 33a3ec39400d25b5e7e56ff47adea396be16fa63 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 8 Oct 2020 19:39:07 +0000 Subject: [PATCH] =?UTF-8?q?B2020-127=20=E2=80=93=20Check=20for=20a=20?= =?UTF-8?q?=E2=80=9C=3F=E2=80=9D=20when=20trying=20to=20parse=20out=20a=20?= =?UTF-8?q?RO=20Image=20file=20name.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs index 8646ac02..144b9d95 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs @@ -582,7 +582,9 @@ namespace VEPROMS.CSLA.Library public string FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo) { string filenameonly = null; - if (Text != null && Text.Length > 0) + //B2020-127 don't try to parse out a file name from "?" (happens with the RO figure no longer exists) + // - this allows it to drop through and put an annotation on the step + if (Text != null && Text.Length > 0 && value != "?") { if (ContentItems[0].MyItem.MyItemInfo.IsFigure) filenameonly = value.Substring(0, value.IndexOf("\n")); @@ -964,7 +966,9 @@ namespace VEPROMS.CSLA.Library public void FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo, ItemInfo ii) // string newvalue) { string fileNameOnly = null; - if (ii.IsFigure && Text != null && Text.Length > 0) + //B2020-127 don't try to parse out a file name from "?" (happens with the RO figure no longer exists) + // - this allows it to drop through and put an annotation on the step + if (ii.IsFigure && Text != null && Text.Length > 0 && value != "?") fileNameOnly = value.Substring(0,value.IndexOf("\n")).Replace(@"\u8209?","-"); // check only the file name of the RO figure string newvalue = value; newvalue = newvalue.Replace("{", @"\{").Replace("}", @"\}");