예제 #1
0
        private void VMToolSelected(object sender, VMSubTool tool)
        {
            if (_currentTool == tool)
            {
                return;
            }
            _controlPanel.SetSelectedTool(tool);
            if (_currentTool != null)
            {
                _currentTool.ToolDeselected(false);
            }
            _currentTool = tool;
            if (_currentTool != null)
            {
                _currentTool.ToolSelected(false);
            }

            Mediator.Publish(EditorMediator.ContextualHelpChanged);
        }
예제 #2
0
        public override void ToolSelected(bool preventHistory)
        {
            Editor.Instance.Focus();

            // Init the points and copy caches
            _copies = new Dictionary <Solid, Solid>();
            Points  = new List <VMPoint>();

            SelectionChanged();

            _snapPointOffset = null;
            _movingPoint     = null;
            MoveSelection    = null;

            if (_currentTool != null)
            {
                _currentTool.ToolSelected(preventHistory);
            }

            Mediator.Subscribe(EditorMediator.SelectionChanged, this);
            Mediator.Subscribe(HotkeysMediator.VMStandardMode, this);
            Mediator.Subscribe(HotkeysMediator.VMScalingMode, this);
            Mediator.Subscribe(HotkeysMediator.VMFaceEditMode, this);
        }