summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/draw-anchor.cpp6
-rw-r--r--src/draw-context.cpp6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp
index 32ee8ca78..363ea0b6e 100644
--- a/src/draw-anchor.cpp
+++ b/src/draw-anchor.cpp
@@ -17,6 +17,7 @@
#include "desktop.h"
#include "desktop-handles.h"
#include "event-context.h"
+#include "lpe-tool-context.h"
#include "display/sodipodi-ctrl.h"
#include "display/curve.h"
@@ -26,6 +27,11 @@
SPDrawAnchor *
sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start, NR::Point delta)
{
+ if (SP_IS_LPETOOL_CONTEXT(dc)) {
+ // suppress all kinds of anchors in LPEToolContext
+ return NULL;
+ }
+
SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(dc);
SPDrawAnchor *a = g_new(SPDrawAnchor, 1);
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 9717c0aa1..c8ce44872 100644
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
@@ -439,9 +439,11 @@ spdc_attach_selection(SPDrawContext *dc, Inkscape::Selection */*sel*/)
if ( !c->is_closed() ) {
SPDrawAnchor *a;
a = sp_draw_anchor_new(dc, c, TRUE, *(c->first_point()));
- dc->white_anchors = g_slist_prepend(dc->white_anchors, a);
+ if (a)
+ dc->white_anchors = g_slist_prepend(dc->white_anchors, a);
a = sp_draw_anchor_new(dc, c, FALSE, *(c->last_point()));
- dc->white_anchors = g_slist_prepend(dc->white_anchors, a);
+ if (a)
+ dc->white_anchors = g_slist_prepend(dc->white_anchors, a);
}
}
/* fixme: recalculate active anchor? */