Browse Source

fixes in Path Handler

pull/633/head
jkuehner 11 years ago
parent
commit
a9e325cf8b
  1. 32
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/PathHandlerExtension.cs

32
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/PathHandlerExtension.cs

@ -754,25 +754,27 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
int _movingDistanceY; int _movingDistanceY;
public void KeyDownAction(object sender, KeyEventArgs e) public void KeyDownAction(object sender, KeyEventArgs e)
{ {
if (IsArrowKey(e.Key)) { if (_selectedThumbs.Count > 0) {
if (operation == null) { if (IsArrowKey(e.Key)) {
SetOperation(); if (operation == null) {
_isKeyboardMoveing = true; SetOperation();
_movingDistanceX = 0; _isKeyboardMoveing = true;
_movingDistanceY = 0; _movingDistanceX = 0;
_movingDistanceY = 0;
}
} }
}
var dx1 = (e.Key == Key.Left) ? Keyboard.IsKeyDown(Key.LeftShift) ? - 10 : - 1 : 0; var dx1 = (e.Key == Key.Left) ? Keyboard.IsKeyDown(Key.LeftShift) ? - 10 : - 1 : 0;
var dy1 = (e.Key == Key.Up) ? Keyboard.IsKeyDown(Key.LeftShift) ? - 10 : - 1 : 0; var dy1 = (e.Key == Key.Up) ? Keyboard.IsKeyDown(Key.LeftShift) ? - 10 : - 1 : 0;
var dx2 = (e.Key == Key.Right) ? Keyboard.IsKeyDown(Key.LeftShift) ? + 10 : + 1 : 0; var dx2 = (e.Key == Key.Right) ? Keyboard.IsKeyDown(Key.LeftShift) ? + 10 : + 1 : 0;
var dy2 = (e.Key == Key.Down) ? Keyboard.IsKeyDown(Key.LeftShift) ? + 10 : + 1 : 0; var dy2 = (e.Key == Key.Down) ? Keyboard.IsKeyDown(Key.LeftShift) ? + 10 : + 1 : 0;
_movingDistanceX += (dx1 + dx2); _movingDistanceX += (dx1 + dx2);
_movingDistanceY += (dy1 + dy2); _movingDistanceY += (dy1 + dy2);
if (operation != null) if (operation != null)
MovePoints(_movingDistanceX, _movingDistanceY, false); MovePoints(_movingDistanceX, _movingDistanceY, false);
}
} }
public void KeyUpAction(object sender, KeyEventArgs e) public void KeyUpAction(object sender, KeyEventArgs e)

Loading…
Cancel
Save