Code

Missed a win32 fix.
[inkscape.git] / src / draw-anchor.cpp
index 32ee8ca78be02f305cb2618a818a06977d848837..f3a42ca4e797a4c7184a9b2fe60f24e0c5a5df17 100644 (file)
@@ -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"
 
  * Creates an anchor object and initializes it.
  */
 SPDrawAnchor *
-sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start, NR::Point delta)
+sp_draw_anchor_new(SPDrawContext *dc, SPCurve *curve, gboolean start, Geom::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);
@@ -72,11 +78,11 @@ sp_draw_anchor_destroy(SPDrawAnchor *anchor)
  * pointer to it or NULL.
  */
 SPDrawAnchor *
-sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, gboolean activate)
+sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, gboolean activate)
 {
     SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(anchor->dc);
 
-    if ( activate && ( NR::LInfty( w - dt->d2w(anchor->dp) ) <= A_SNAP ) ) {
+    if ( activate && ( Geom::LInfty( w - dt->d2w(anchor->dp) ) <= A_SNAP ) ) {
         if (!anchor->active) {
             sp_canvas_item_set((GtkObject *) anchor->ctrl, "filled", TRUE, NULL);
             anchor->active = TRUE;
@@ -101,4 +107,4 @@ sp_draw_anchor_test(SPDrawAnchor *anchor, NR::Point w, gboolean activate)
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :