Northwoods.Go Assembly > Northwoods.Go Namespace > GoView Class : MoveSelection Method |
This method heeds the CanMoveObjects property if sel is this view's Selection, and the CanMove predicate for each GoObject that is not an IGoLink. To accomplish the move, each object's DoMove is called, to support object-specific move behavior. All actions take place within a GoUndoManager.MoveSelectionName transaction. This does not raise the SelectionMoved
event; that event is raised by the GoToolDragging tool's DoMouseUp method. If there are any duplicates in the selection, objects may get moved multiple times. Note that an object may be moved twice if both it and one of its parents are in the selection.
When grid is true, each of the non-link objects in the selection sel is "snapped" to the proper location, by calling SnapPoint. It is always each object's GoObject.Location that is snapped to some point. However, links that are in the selection are never "snapped"; they are always moved by the distance that the first movable non-link object in the selection is moved, which may have been grid-snapped. This policy supports moving links without recalculating their paths, as long as their connected ports/nodes are all moved together by the same distance, whether those nodes are "snapped" or not.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2