internal void deleteGroup(Group group) { groups.Remove(group); group.onDelete(); group = null; }
/// <summary> /// Creates a new hierarchical group. /// </summary> /// <param name="mainObj">The group master item; the subordinated items will follow the /// master one when it is moved around.</param> /// <returns>A new Group instance.</returns> public Group CreateGroup(ChartObject mainObj) { if (mainObj == null) return null; Group group = new Group(this); if (group.setMainObject(mainObj)) { AddGroupCmd cmd= new AddGroupCmd(mainObj, group); undoManager.executeCommand(cmd); return group; } else { group.onDelete(); group = null; return null; } }