From d6d1f4e5f7d532e13b95270991a1bb6101fafadc Mon Sep 17 00:00:00 2001 From: zueuk Date: Wed, 31 Oct 2007 11:51:50 +0000 Subject: [PATCH] preview panning fixed --- 2.10/Source/Adjust.dfm | 5 +++-- 2.10/Source/Adjust.pas | 11 +++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/2.10/Source/Adjust.dfm b/2.10/Source/Adjust.dfm index 75ee779..4819613 100644 --- a/2.10/Source/Adjust.dfm +++ b/2.10/Source/Adjust.dfm @@ -170,6 +170,7 @@ object AdjustForm: TAdjustForm Center = True IncrementalDisplay = True PopupMenu = QualityPopup + OnDblClick = PreviewImageDblClick OnMouseDown = PreviewImageMouseDown OnMouseMove = PreviewImageMouseMove OnMouseUp = PreviewImageMouseUp @@ -1007,7 +1008,7 @@ object AdjustForm: TAdjustForm end object pnlMasterScale: TPanel Left = 280 - Top = 108 + Top = 106 Width = 57 Height = 21 Cursor = crHandPoint @@ -1025,7 +1026,7 @@ object AdjustForm: TAdjustForm end object editPPU: TEdit Left = 336 - Top = 108 + Top = 106 Width = 49 Height = 21 TabOrder = 3 diff --git a/2.10/Source/Adjust.pas b/2.10/Source/Adjust.pas index a4c9557..c7565e6 100644 --- a/2.10/Source/Adjust.pas +++ b/2.10/Source/Adjust.pas @@ -2162,8 +2162,15 @@ begin Inc(camDragPos.x, x - camDragOld.x); Inc(camDragPos.y, y - camDragOld.y); - vx := Round6(camDragValueX - (camDragPos.x * camCos - camDragPos.y * camSin) / 200); - vy := Round6(camDragValueY - (camDragPos.x * camSin + camDragPos.y * camCos) / 200); + if GetKeyState(VK_MENU) < 0 then sc := 1000 + else if GetKeyState(VK_CONTROL) < 0 then sc := 100 + else if GetKeyState(VK_SHIFT) < 0 then sc := 1 + else sc := 10; + + sc := sc * cp.pixels_per_unit; + + vx := Round6(camDragValueX - (camDragPos.x * camCos - camDragPos.y * camSin) / sc); + vy := Round6(camDragValueY - (camDragPos.x * camSin + camDragPos.y * camCos) / sc); cp.center[0] := vx; txtCenterX.Text := FloatToStr(vx);