Fix removing byml properties from dictionaries and lists on save
This commit is contained in:
parent
d664a47426
commit
7cd86b9a05
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -534,10 +534,15 @@ namespace FirstPlugin
|
||||
|
||||
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewCustom1.SelectedItems.Count <= 0)
|
||||
if (listViewCustom1.SelectedItems.Count <= 0 || treeView1.SelectedNode == null)
|
||||
return;
|
||||
|
||||
dynamic targetNode = treeView1.SelectedNode.Tag;
|
||||
dynamic target = listViewCustom1.SelectedItems[0].Tag;
|
||||
if (targetNode is IDictionary<string, dynamic>)
|
||||
((IDictionary<string, dynamic>)targetNode).Remove(listViewCustom1.SelectedItems[0].Text);
|
||||
if (targetNode is IList<dynamic>)
|
||||
((IList<dynamic>)targetNode).Remove(target);
|
||||
|
||||
int index = listViewCustom1.Items.IndexOf(listViewCustom1.SelectedItems[0]);
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user