/// <summary> /// Add the <see cref="P:Northwoods.Go.GoToolCreating.NewObject" /> to this view's document. /// </summary> /// <remarks> /// This removes the <see cref="P:Northwoods.Go.GoToolCreating.NewObject" /> from the view and adds it to the view's document. /// It also selects the <see cref="P:Northwoods.Go.GoToolCreating.NewObject" />. /// </remarks> public virtual void DoCreate() { GoObject newObject = NewObject; if (newObject != null) { newObject.Remove(); if (Modal && !OneShot) { base.View.StartTransaction(); } if (ResizesSelectionObject) { newObject.SelectionObject.Bounds = ComputeBox(); } else { newObject.Bounds = ComputeBox(); } base.View.Document.Add(newObject); base.View.Selection.Select(newObject); if (Modal && !OneShot) { base.View.FinishTransaction("Drag Created"); } else { base.TransactionResult = "Drag Created"; } } }