B2016-267: Linking to enhanced background steps crashed if step had RO and if no RO path was set.
This commit is contained in:
parent
0e3ab668c8
commit
96dcbdcc76
@ -2135,6 +2135,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return link.Contains("#Link:Transition");
|
return link.Contains("#Link:Transition");
|
||||||
}
|
}
|
||||||
private static Regex regRefObj = new Regex(@"\#Link\:ReferencedObject:([0-9]*) ([0-9a-zA-Z]*) ([0-9]*)", RegexOptions.Singleline);
|
private static Regex regRefObj = new Regex(@"\#Link\:ReferencedObject:([0-9]*) ([0-9a-zA-Z]*) ([0-9]*)", RegexOptions.Singleline);
|
||||||
|
private static bool DidMsgBox = false;
|
||||||
private static bool IsSetpointRO(string link, DocVersionInfo myDocVersion)
|
private static bool IsSetpointRO(string link, DocVersionInfo myDocVersion)
|
||||||
{
|
{
|
||||||
Match myMatch = regRefObj.Match(link);
|
Match myMatch = regRefObj.Match(link);
|
||||||
@ -2143,7 +2144,17 @@ namespace VEPROMS.CSLA.Library
|
|||||||
int dbid = System.Convert.ToInt32(myMatch.Groups[2].Value.Substring(0, 4), 16);
|
int dbid = System.Convert.ToInt32(myMatch.Groups[2].Value.Substring(0, 4), 16);
|
||||||
int rodbid = int.Parse(myMatch.Groups[3].Value);
|
int rodbid = int.Parse(myMatch.Groups[3].Value);
|
||||||
ROFstInfo myROFst = myDocVersion.GetROFst(rodbid);
|
ROFstInfo myROFst = myDocVersion.GetROFst(rodbid);
|
||||||
return myROFst.IsSetpointDB(dbid, myDocVersion);
|
// B2016-267: Linking to enhanced background steps crashed if step had RO and if no RO path was set. Really problem
|
||||||
|
// is that ro path was not set - just so happened it was found during use of Linking to enhanced.
|
||||||
|
if (myROFst == null)
|
||||||
|
{
|
||||||
|
if (!DidMsgBox) // only put the message box out once.
|
||||||
|
{
|
||||||
|
DidMsgBox = true;
|
||||||
|
MessageBox.Show(string.Format("{0} does not have Referenced Object Path set.",myDocVersion.MyFolder.Name), "No RO Path Set", MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return myROFst==null?false:myROFst.IsSetpointDB(dbid, myDocVersion);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user