-
Notifications
You must be signed in to change notification settings - Fork 668
Closed
Description
Hi there,
got a suggestion for AddElement_Click(object sender, RoutedEventArgs e) in the dynBench.xaml.cs.
currently you won't make it past the builtinTypes[mi.Header.ToString()] for types that are in the userTypes collection.
Is the User Node supposed to work? Even as a node that doesn't do anything? Here it doesn't manage to initialize a new node.
Kind regards,
Gregor
private void AddElement_Click(object sender, RoutedEventArgs e)
{
System.Windows.Controls.MenuItem mi = e.Source as System.Windows.Controls.MenuItem;
TypeLoadData tld = null;
if (builtinTypes.ContainsKey(mi.Header.ToString()))
{
tld = builtinTypes[mi.Header.ToString()] as TypeLoadData;
...
}
else if (userTypes.ContainsKey(mi.Header.ToString()))
{
tld = userTypes[mi.Header.ToString()] as TypeLoadData;
if (tld != null)
{
dynElement newEl = AddDynElement(tld.t, tld.assembly, mi.Header.ToString(), Guid.NewGuid(), 0.0, 0.0);
...
}
}
}
Metadata
Metadata
Assignees
Labels
No labels