DeleteGroup() public method

public DeleteGroup ( TreeGroup g ) : void
g TreeGroup
return void
コード例 #1
0
 private void DeleteSelected(TreeData treeData)
 {
     this.UndoStoreSelected(EditMode.Delete);
     if (s_SelectedNode != null)
     {
         if (s_SelectedPoint >= 1)
         {
             if (s_SelectedNode.spline.nodes.Length > 2)
             {
                 if (s_SelectedGroup.lockFlags == 0)
                 {
                     s_SelectedGroup.Lock();
                 }
                 s_SelectedNode.spline.RemoveNode(s_SelectedPoint);
                 s_SelectedPoint = Mathf.Max(s_SelectedPoint - 1, 0);
             }
         }
         else
         {
             if ((s_SelectedGroup != null) && (s_SelectedGroup.nodeIDs.Length == 1))
             {
                 s_SelectedNode = null;
                 this.DeleteSelected(treeData);
                 return;
             }
             treeData.DeleteNode(s_SelectedNode);
             s_SelectedGroup.Lock();
             this.SelectGroup(s_SelectedGroup);
         }
     }
     else if (s_SelectedGroup != null)
     {
         TreeGroup group = treeData.GetGroup(s_SelectedGroup.parentGroupID);
         if (group == null)
         {
             return;
         }
         treeData.DeleteGroup(s_SelectedGroup);
         this.SelectGroup(group);
     }
     this.m_WantCompleteUpdate = true;
     UpdateMesh(base.target as Tree);
     this.m_WantCompleteUpdate = false;
 }