Code

disable snapindicator for now to fix pen tool
authorjohanengelen <johanengelen@users.sourceforge.net>
Thu, 13 Mar 2008 12:04:23 +0000 (12:04 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Thu, 13 Mar 2008 12:04:23 +0000 (12:04 +0000)
src/display/snap-indicator.cpp

index ba9c10ef2dfc99668793b77ce603c167cb398a3c..b6046e88c5ea504f60515c6474e4c53267b64084 100644 (file)
@@ -19,8 +19,6 @@
 namespace Inkscape {\r
 namespace Display {\r
 \r
-/** lifetime is measured in milliseconds\r
- */\r
 SnapIndicator::SnapIndicator(SPDesktop * desktop)\r
     :   tempitem(NULL),\r
         desktop(desktop)\r
@@ -38,17 +36,21 @@ SnapIndicator::set_new_snappoint(Geom::Point p)
 {\r
     remove_snappoint();\r
 \r
-    SPCanvasItem * canvasitem = sp_canvas_item_new( sp_desktop_tempgroup (desktop),\r
-                                                    SP_TYPE_CTRL,\r
-                                                    "anchor", GTK_ANCHOR_CENTER,\r
-                                                    "size", 6.0,\r
-                                                    "stroked", TRUE,\r
-                                                    "stroke_color", 0xf000f0ff,\r
-                                                    "mode", SP_KNOT_MODE_XOR,\r
-                                                    "shape", SP_KNOT_SHAPE_CROSS,\r
-                                                    NULL );\r
-    SP_CTRL(canvasitem)->moveto ( p );\r
-    tempitem = desktop->add_temporary_canvasitem(canvasitem, 1000);\r
+    bool enabled = false;  // TODO add preference for snap indicator.\r
+    if (enabled) {\r
+        // TODO add many different kinds of snap indicator :-)\r
+        SPCanvasItem * canvasitem = sp_canvas_item_new( sp_desktop_tempgroup (desktop),\r
+                                                        SP_TYPE_CTRL,\r
+                                                        "anchor", GTK_ANCHOR_CENTER,\r
+                                                        "size", 10.0,\r
+                                                        "stroked", TRUE,\r
+                                                        "stroke_color", 0xf000f0ff,\r
+                                                        "mode", SP_KNOT_MODE_XOR,\r
+                                                        "shape", SP_KNOT_SHAPE_CROSS,\r
+                                                        NULL );\r
+        SP_CTRL(canvasitem)->moveto ( p );\r
+        tempitem = desktop->add_temporary_canvasitem(canvasitem, 1000); // TODO add preference for snap indicator timeout\r
+    }\r
 }\r
 \r
 void\r