private void addToNextUpToolStripMenuItem_Click(object sender, EventArgs e) { ResourceNode node = SelectedBone as ResourceNode; if (node != null && node.AddUp()) { TreeNode bone = _treeNodes[SelectedBone.BoneIndex], prev = null; if (bone != null && bone.PrevNode != null) { prev = bone.PrevNode; } else { return; } boneTree.BeginUpdate(); node.Parent = node.Parent.Children[node.Index - 1]; bone.Remove(); prev.Nodes.Add(bone); node.OnMoved(); boneTree.EndUpdate(); bone.EnsureVisible(); _mainWindow.ModelPanel.Invalidate(); } }