From 187526a28b0756452e8701e015c30b6ffc9e6e28 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Fri, 17 Aug 2007 16:22:23 +0000 Subject: Draw perspective lines for infinite VPs, too (they are updated during scrolling or zooming); don't create knots for infinite VPs on the canvas (bzr r3495) --- src/display/sp-canvas.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/display/sp-canvas.cpp') diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index fef2fcc0c..c53b1e61b 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -34,6 +34,8 @@ #include #include #include "prefs-utils.h" +#include "box3d-context.h" +#include "inkscape.h" // Tiles are a way to minimize the number of redraws, eliminating too small redraws. // The canvas stores a 2D array of ints, each representing a TILE_SIZExTILE_SIZE pixels tile. @@ -2193,6 +2195,15 @@ sp_canvas_scroll_to (SPCanvas *canvas, double cx, double cy, unsigned int clear, } else { // scrolling as part of zoom; do nothing here - the next do_update will perform full redraw } + + /* update perspective lines if we are in the 3D box tool (so that infinite ones are shown correctly) */ + SPEventContext *ec = inkscape_active_event_context(); + if (SP_IS_3DBOX_CONTEXT (ec)) { + // We could avoid redraw during panning by checking the status of is_scrolling, but this is + // neither faster nor does it get rid of artefacts, so we update PLs unconditionally + SP3DBoxContext *bc = SP_3DBOX_CONTEXT (ec); + bc->_vpdrag->updateLines(); + } } /** -- cgit v1.2.3