Bug Fix - If a node doesn't have a parent, the program will not crash
This commit is contained in:
parent
7ab1302c84
commit
147dd8919c
@ -341,11 +341,13 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
void myItemInfo_NewSiblingBefore(object sender, ItemInfoInsertEventArgs args)
|
||||
{
|
||||
this.Parent.Nodes.Insert(Index,(new VETreeNode(args.ItemInserted)));
|
||||
if(this.Parent != null) // Only do this if the node has a parent - RHM 20100106
|
||||
this.Parent.Nodes.Insert(Index,(new VETreeNode(args.ItemInserted)));
|
||||
}
|
||||
void myItemInfo_NewSiblingAfter(object sender, ItemInfoInsertEventArgs args)
|
||||
{
|
||||
this.Parent.Nodes.Insert(Index+1, (new VETreeNode(args.ItemInserted)));
|
||||
if (this.Parent != null) // Only do this if the node has a parent - RHM 20100106
|
||||
this.Parent.Nodes.Insert(Index + 1, (new VETreeNode(args.ItemInserted)));
|
||||
}
|
||||
void MyContent_Changed(object sender)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user