sequence highlight works in viewer

This commit is contained in:
Chris Forbes
2009-10-28 21:26:35 +13:00
parent 92d28a6354
commit 5d1ae1cb2a
4 changed files with 30 additions and 1 deletions

View File

@@ -75,7 +75,14 @@ namespace SequenceEditor
public Sequence(XmlElement e)
{
start = int.Parse(e.GetAttribute("start"));
shp = e.GetAttribute("src");
if (shp == "") shp = Program.UnitName;
var a = e.GetAttribute("length");
length = (a == "*")
? Program.Shps[shp].Length - start
: ((a == "") ? 1 : int.Parse(a));
}
}
}