示例#1
0
        // update snaps
        private void Scene_SelectionChangedEvent(object sender, EventArgs e)
        {
            // update active snap set based on new selection
            var selected = scene.Selected;

            Snaps.ClearActive();
            foreach (SceneObject so in selected)
            {
                if (so is PivotSO || Snaps.IgnoreSet.Contains(so))
                {
                    continue;
                }
                Snaps.AddToActive(so);
            }
            Snaps.AddToActive(scene.Find((x) => x is PivotSO));
        }
示例#2
0
 private void ActiveScene_SelectionChangedEvent(object sender, EventArgs e)
 {
     // if we are in a potential snap-drag, update the active set based on
     // the new selection
     if (Snaps.IgnoreSet.Count > 0)
     {
         var selected = cockpit.Scene.Selected;
         Snaps.ClearActive();
         foreach (SceneObject so in selected)
         {
             if (so is PivotSO || Snaps.IgnoreSet.Contains(so))
             {
                 continue;
             }
             Snaps.AddToActive(so);
         }
         Snaps.AddToActive(cockpit.Scene.Find((x) => x is PivotSO));
     }
 }