summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d705893)
raw | patch | inline | side by side (parent: d705893)
author | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:37:32 +0000 (00:37 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Mon, 18 Aug 2008 00:37:32 +0000 (00:37 +0000) |
src/draw-anchor.cpp | patch | blob | history | |
src/draw-context.cpp | patch | blob | history |
diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp
index 32ee8ca78be02f305cb2618a818a06977d848837..363ea0b6ea095e6383042fb4038c12a31e480a16 100644 (file)
--- a/src/draw-anchor.cpp
+++ b/src/draw-anchor.cpp
#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"
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 9717c0aa1e9d56cda8c36349faa5c44618f95525..c8ce44872ad23caa4dddd34745f6e074effaa9bc 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
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? */