diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2009-01-25 14:18:02 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2009-01-25 14:18:02 +0000 |
| commit | a96c86bc123dd55279face6372339b37c169a0d0 (patch) | |
| tree | 8562f5728710b6f9433519e8350168bb7f145035 /src/display/snap-indicator.cpp | |
| parent | - The snap-delay mechanism should now be more robust. From now on, it must be... (diff) | |
| download | inkscape-a96c86bc123dd55279face6372339b37c169a0d0.tar.gz inkscape-a96c86bc123dd55279face6372339b37c169a0d0.zip | |
Display the snap source indicator only when snapping is enabled
(bzr r7173)
Diffstat (limited to 'src/display/snap-indicator.cpp')
| -rw-r--r-- | src/display/snap-indicator.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/display/snap-indicator.cpp b/src/display/snap-indicator.cpp index c21bd3dbc..98358dbab 100644 --- a/src/display/snap-indicator.cpp +++ b/src/display/snap-indicator.cpp @@ -40,15 +40,15 @@ void SnapIndicator::set_new_snaptarget(Inkscape::SnappedPoint const p) { remove_snaptarget(); - + g_assert(_desktop != NULL); - + /* Commented out for now, because this might hide any snapping bug! if (!p.getSnapped()) { return; // If we haven't snapped, then it is of no use to draw a snapindicator } */ - + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool value = prefs->getBool("/options/snapindicator/value", true); @@ -110,12 +110,12 @@ void SnapIndicator::set_new_snapsource(Geom::Point const p) { remove_snapsource(); - + g_assert(_desktop != NULL); - + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool value = prefs->getBool("/options/snapindicator/value", true); - + if (value) { SPCanvasItem * canvasitem = sp_canvas_item_new( sp_desktop_tempgroup (_desktop), SP_TYPE_CTRL, @@ -124,9 +124,9 @@ SnapIndicator::set_new_snapsource(Geom::Point const p) "stroked", TRUE, "stroke_color", 0xf000f0ff, "mode", SP_KNOT_MODE_XOR, - "shape", SP_KNOT_SHAPE_DIAMOND, - NULL ); - + "shape", SP_KNOT_SHAPE_CIRCLE, + NULL ); + SP_CTRL(canvasitem)->moveto(p); _snapsource = _desktop->add_temporary_canvasitem(canvasitem, 1000); } |
