summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8c8f0c8)
raw | patch | inline | side by side (parent: 8c8f0c8)
author | cilix42 <cilix42@users.sourceforge.net> | |
Sun, 9 Mar 2008 14:49:33 +0000 (14:49 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Sun, 9 Mar 2008 14:49:33 +0000 (14:49 +0000) |
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index e03f7d184bfbb06f5831d045f02c9403e75d1356..9ee920c1b21ab5c26823b75b1d60791798489a7d 100644 (file)
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
bc->extruded = false;
}
+void sp_box3d_context_update_lines(SPEventContext *ec) {
+ /* update perspective lines if we are in the 3D box tool (so that infinite ones are shown correctly) */
+ if (SP_IS_BOX3D_CONTEXT (ec)) {
+ Box3DContext *bc = SP_BOX3D_CONTEXT (ec);
+ bc->_vpdrag->updateLines();
+ }
+}
+
/*
Local Variables:
mode:c++
diff --git a/src/box3d-context.h b/src/box3d-context.h
index 1817aa180ff251256e1b0d584aa1f4813c2fc303..38058b1cb195eaf4a6e2a8ed7da0086eabdb9792 100644 (file)
--- a/src/box3d-context.h
+++ b/src/box3d-context.h
GtkType sp_box3d_context_get_type (void);
+void sp_box3d_context_update_lines(SPEventContext *ec);
+
#endif /* __SP_BOX3D_CONTEXT_H__ */
/*
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 3ff4bf2f590df2376e7078d35ac7d04317a97229..f9d17b01ad6bbc5e938c8c9c5df0e2b8007427ab 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
#include "event-log.h"
#include "display/canvas-grid.h"
#include "widgets/desktop-widget.h"
+#include "box3d-context.h"
#include "display/sp-canvas.h"
/* Scroll */
sp_canvas_scroll_to (canvas, x0 * newscale - border, y1 * -newscale - border, clear);
+ /* update perspective lines if we are in the 3D box tool (so that infinite ones are shown correctly) */
+ sp_box3d_context_update_lines(event_context);
+
_widget->updateRulers();
_widget->updateScrollbars(expansion(_d2w));
_widget->updateZoom();
sp_canvas_scroll_to(canvas, viewbox.min()[NR::X] - dx, viewbox.min()[NR::Y] - dy, FALSE, is_scrolling);
+ /* update perspective lines if we are in the 3D box tool (so that infinite ones are shown correctly) */
+ sp_box3d_context_update_lines(event_context);
+
_widget->updateRulers();
_widget->updateScrollbars(expansion(_d2w));
}
index b042f0d68ce96d76c581e65cde28df7d8d0b0734..86b1e9eabbbb75580a0063238e705e55754a2aed 100644 (file)
#include <libnr/nr-matrix-ops.h>
#include <libnr/nr-convex-hull.h>
#include "prefs-utils.h"
-#include "box3d-context.h"
#include "inkscape.h"
#include "sodipodi-ctrlrect.h"
#if ENABLE_LCMS
@@ -2117,15 +2116,6 @@ 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_BOX3D_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
- Box3DContext *bc = SP_BOX3D_CONTEXT (ec);
- bc->_vpdrag->updateLines();
- }
}
/**
index bd329e3366c7255a1157104fc7a0edcabf8f4580..b8e01eb6c1a2e84ec765dc4edc6e63500f406940 100644 (file)
#include "ege-color-prof-tracker.h"
#include "color-profile-fns.h"
#include "xml/node-observer.h"
+#include "box3d-context.h"
#if defined (SOLARIS_2_8)
#include "round.h"
@@ -1425,6 +1426,9 @@ sp_desktop_widget_adjustment_value_changed (GtkAdjustment */*adj*/, SPDesktopWid
sp_canvas_scroll_to (dtw->canvas, dtw->hadj->value, dtw->vadj->value, FALSE);
sp_desktop_widget_update_rulers (dtw);
+ /* update perspective lines if we are in the 3D box tool (so that infinite ones are shown correctly) */
+ sp_box3d_context_update_lines(dtw->desktop->event_context);
+
dtw->update = 0;
}