summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f780ca1)
raw | patch | inline | side by side (parent: f780ca1)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Sun, 25 Jan 2009 14:18:02 +0000 (14:18 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Sun, 25 Jan 2009 14:18:02 +0000 (14:18 +0000) |
src/display/snap-indicator.cpp | patch | blob | history | |
src/seltrans.cpp | patch | blob | history | |
src/snap.cpp | patch | blob | history |
index c21bd3dbc8bad6b2992964525899a6cb3a370783..98358dbabbd63fdfc6b0fad8140094181916e13c 100644 (file)
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);
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,
"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);
}
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index b1917edfd523393abfe150eea325634e1a0ca162..76cfbe225a4c824212843efe8e8027e8d7f2489e 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
@@ -359,10 +359,12 @@ void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool s
// Now either _bbox_points or _snap_points has a single element, the other one has zero..... or both have zero elements
g_assert((_bbox_points.size() + _snap_points.size()) < 2);
- if (_bbox_points.size() == 1) {
- _desktop->snapindicator->set_new_snapsource(_bbox_points.at(0));
- } else if (_snap_points.size() == 1){
- _desktop->snapindicator->set_new_snapsource(_snap_points.at(0));
+ if (m.snapprefs.getSnapEnabledGlobally()) {
+ if (_bbox_points.size() == 1) {
+ _desktop->snapindicator->set_new_snapsource(_bbox_points.at(0));
+ } else if (_snap_points.size() == 1){
+ _desktop->snapindicator->set_new_snapsource(_snap_points.at(0));
+ }
}
}
diff --git a/src/snap.cpp b/src/snap.cpp
index 11ba077e449976e42031fd4112a347c9b5f8b621..7404ed12b8eaea62a60476e40fec1e3837a01f06 100644 (file)
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -939,7 +939,7 @@ void SnapManager::_displaySnapsource(Inkscape::SnapPreferences::PointType point_
if (prefs->getBool("/options/snapclosestonly/value")) {
bool p_is_a_node = point_type & Inkscape::SnapPreferences::SNAPPOINT_NODE;
bool p_is_a_bbox = point_type & Inkscape::SnapPreferences::SNAPPOINT_BBOX;
- if ((p_is_a_node && snapprefs.getSnapModeNode()) || (p_is_a_bbox && snapprefs.getSnapModeBBox())) {
+ if (snapprefs.getSnapEnabledGlobally() && ((p_is_a_node && snapprefs.getSnapModeNode()) || (p_is_a_bbox && snapprefs.getSnapModeBBox()))) {
_desktop->snapindicator->set_new_snapsource(p);
} else {
_desktop->snapindicator->remove_snapsource();