private void OnDelete(object o, EventArgs args) { Command command = new SortedListRemoveCommand <Path.Node>("Added Path node", path, field, selectedNode); command.Do(); UndoManager.AddCommand(command); selectedNode = null; dragging = false; Redraw(); }
private void OnDelete(object o, EventArgs args) { if (path.Nodes.Count > 1) { Command command = new SortedListRemoveCommand <Path.Node>("Deleted Path node", path, field, selectedNode); command.Do(); UndoManager.AddCommand(command); selectedNode = null; dragging = false; Redraw(); } else { Application.EditorApplication.DeleteCurrentPath(); } }
private void OnDragEnd(object o, DragEndArgs args) { if (draggedID > NONE) //Widget.DragFailed is not aviable for windows users { Command command = new SortedListRemoveCommand <string>( "Removed badguy \"" + draggedBadguy + "\" from the queue", _object, field, draggedID); command.Do(); UndoManager.AddCommand(command); draggedID = NONE; draggedBadguy = ""; dragging = false; if (badguys.Count == 0) { Gtk.Drag.SourceUnset(this); } } }
private void OnDelete(object o, EventArgs args) { if (path.Nodes.Count > 1) { Command command = new SortedListRemoveCommand<Path.Node>("Deleted Path node", path, field, selectedNode); command.Do(); UndoManager.AddCommand(command); selectedNode = null; dragging = false; Redraw(); } else { Application.EditorApplication.DeleteCurrentPath(); } }
private void OnDragEnd(object o, DragEndArgs args) { if (draggedID > NONE) { //Widget.DragFailed is not aviable for windows users Command command = new SortedListRemoveCommand<string>( "Removed badguy \"" + draggedBadguy + "\" from the queue", _object, field, draggedID); command.Do(); UndoManager.AddCommand(command); draggedID = NONE; draggedBadguy = ""; dragging = false; if (badguys.Count == 0) Gtk.Drag.SourceUnset(this); } }