From dbe0fa78bb93b94e47fa8defabd6185836846b0d Mon Sep 17 00:00:00 2001 From: rylek Date: Mon, 15 Aug 2011 19:44:34 +0000 Subject: [PATCH] .Geom/Ctrl/PlotterCtrl.cpp: fixed omission - calling WhenUserZoom after panning git-svn-id: svn://ultimatepp.org/upp/trunk@3764 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Geom/Ctrl/PlotterCtrl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/uppsrc/Geom/Ctrl/PlotterCtrl.cpp b/uppsrc/Geom/Ctrl/PlotterCtrl.cpp index 17f6426cf..885cfc0fb 100644 --- a/uppsrc/Geom/Ctrl/PlotterCtrl.cpp +++ b/uppsrc/Geom/Ctrl/PlotterCtrl.cpp @@ -746,8 +746,10 @@ void PlotterCtrl::Drag(Point start, Point prev, Point curr, dword keyflags) break; } case DRAG_PAN: { - if(!IsNull(curr)) + if(!IsNull(curr)) { PanOffset(curr - start); + WhenUserZoom(); + } break; } case DRAG_CUSTOM: { @@ -779,7 +781,6 @@ void PlotterCtrl::Drop(Point start, Point end, dword keyflags) Sizef new_scale = GetScale() / ratio; Pointf new_delta = Sizef(GetSize() >> 1) - Sizef(log_center) * new_scale; SetZoom(new_scale, new_delta); - WhenUserZoom(); break; } case DRAG_ZOOM_OUT: { @@ -787,7 +788,6 @@ void PlotterCtrl::Drop(Point start, Point end, dword keyflags) Sizef new_scale = GetScale() * ratio; Pointf new_delta = Pointf(scr_center) - Sizef(view.CenterPoint()) * new_scale; SetZoom(new_scale, new_delta); - WhenUserZoom(); break; } case DRAG_PAN: { @@ -796,6 +796,7 @@ void PlotterCtrl::Drop(Point start, Point end, dword keyflags) break; } } + WhenUserZoom(); } drag_mode = DRAG_NONE; } @@ -812,6 +813,7 @@ void PlotterCtrl::Cancel() if(drag_drop && drag_mode == DRAG_CUSTOM) { drag_drop->Cancel(); } + WhenUserZoom(); } bool PlotterCtrl::Key(dword key, int repcnt)