mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.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:
parent
e58842ca75
commit
dbe0fa78bb
1 changed files with 5 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue