From 1f73043224256571ebbbbad8b7e8be4bbc09f9ed Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Wed, 30 Jan 2008 20:05:58 +0000 Subject: 2nd part of the fix for bug #167500: correctly update the rulers when they change size (bzr r4621) --- src/desktop.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/desktop.cpp') diff --git a/src/desktop.cpp b/src/desktop.cpp index 9498d5399..8cd63a68c 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -645,7 +645,7 @@ SPDesktop::push_current_zoom (GList **history) } /** - * Set viewbox. + * Set viewbox (x0, x1, y0 and y1 are in document pixels. Border is in screen pixels). */ void SPDesktop::set_display_area (double x0, double y0, double x1, double y1, double border, bool log) @@ -673,7 +673,7 @@ SPDesktop::set_display_area (double x0, double y0, double x1, double y1, double newscale = viewbox.dimensions()[NR::Y] / (y1 - y0); } - newscale = CLAMP(newscale, SP_DESKTOP_ZOOM_MIN, SP_DESKTOP_ZOOM_MAX); + newscale = CLAMP(newscale, SP_DESKTOP_ZOOM_MIN, SP_DESKTOP_ZOOM_MAX); // unit: 'screen pixels' per 'document pixels' int clear = FALSE; if (!NR_DF_TEST_CLOSE (newscale, scale, 1e-4 * scale)) { @@ -684,7 +684,7 @@ SPDesktop::set_display_area (double x0, double y0, double x1, double y1, double clear = TRUE; } - /* Calculate top left corner */ + /* Calculate top left corner (in document pixels) */ x0 = cx - 0.5 * viewbox.dimensions()[NR::X] / newscale; y1 = cy + 0.5 * viewbox.dimensions()[NR::Y] / newscale; -- cgit v1.2.3