diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2017-03-13 14:22:22 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2017-03-13 14:22:22 +0000 |
| commit | 014489163050d8abe9e5c4949fb80f3c21b1c17b (patch) | |
| tree | 7cbeb87aa023d563986b32f65fd500c6072ee86a /src/sp-namedview.cpp | |
| parent | Two Extensions for converting objects to paths before exporting. (Bug 1662531) (diff) | |
| download | inkscape-014489163050d8abe9e5c4949fb80f3c21b1c17b.tar.gz inkscape-014489163050d8abe9e5c4949fb80f3c21b1c17b.zip | |
Replace rectangle based zooming by affine based zooming.
This allows a rotation to be included in the drawing to window mapping.
General code cleanup.
Added documentation.
Any change to zooming behavior is probably a bug.
(bzr r15592)
Diffstat (limited to 'src/sp-namedview.cpp')
| -rw-r--r-- | src/sp-namedview.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 166e90238..403b8a41b 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -839,18 +839,18 @@ void sp_namedview_window_from_document(SPDesktop *desktop) } } + // Cancel any history of transforms up to this point (must be before call to zoom). + desktop->clear_transform_history(); + // restore zoom and view if (nv->zoom != 0 && nv->zoom != HUGE_VAL && !IS_NAN(nv->zoom) && nv->cx != HUGE_VAL && !IS_NAN(nv->cx) && nv->cy != HUGE_VAL && !IS_NAN(nv->cy)) { - desktop->zoom_absolute(nv->cx, nv->cy, nv->zoom); + desktop->zoom_absolute_center_point( Geom::Point(nv->cx, nv->cy), nv->zoom ); } else if (desktop->getDocument()) { // document without saved zoom, zoom to its page desktop->zoom_page(); } - // cancel any history of zooms up to this point - desktop->zooms_past.clear(); - if (show_dialogs) { desktop->show_dialogs(); } @@ -1280,7 +1280,7 @@ void SPNamedView::translateGrids(Geom::Translate const &tr) { void SPNamedView::scrollAllDesktops(double dx, double dy, bool is_scrolling) { for(std::vector<SPDesktop *>::iterator it=this->views.begin();it!=this->views.end();++it ) { - (*it)->scroll_world_in_svg_coords(dx, dy, is_scrolling); + (*it)->scroll_relative_in_svg_coords(dx, dy, is_scrolling); } } |
