.Geom/Ctrl/PlotterCtrl.cpp: fixed omission - calling WhenUserZoom after panning

git-svn-id: svn://ultimatepp.org/upp/trunk@3764 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
rylek 2011-08-15 19:44:34 +00:00
parent e58842ca75
commit dbe0fa78bb

View file

@ -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)