From 5766ce1b38b9e065be5b47b0c025b577769f16aa Mon Sep 17 00:00:00 2001 From: dvlierop2 Date: Sun, 22 Feb 2009 21:46:54 +0000 Subject: [PATCH] Snapping of guides now turned on by default, and fixed initialization of the that checkbox --- src/display/snap-indicator.cpp | 2 +- src/snap-preferences.cpp | 2 +- src/sp-namedview.cpp | 7 +------ src/ui/dialog/document-properties.cpp | 3 ++- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/display/snap-indicator.cpp b/src/display/snap-indicator.cpp index 4d16f9ffb..0ba4d7786 100644 --- a/src/display/snap-indicator.cpp +++ b/src/display/snap-indicator.cpp @@ -95,7 +95,7 @@ SnapIndicator::set_new_snaptarget(Inkscape::SnappedPoint const p) target_name = _("bounding box side"); break; case SNAPTARGET_GRADIENT: - target_name = _("gradient"); + target_name = _("gradient level"); break; case SNAPTARGET_PAGE_BORDER: target_name = _("page border"); diff --git a/src/snap-preferences.cpp b/src/snap-preferences.cpp index e8c9e0641..3e396a216 100644 --- a/src/snap-preferences.cpp +++ b/src/snap-preferences.cpp @@ -32,7 +32,7 @@ Inkscape::SnapPreferences::SnapPreferences() : _snap_to_page_border(false), _strict_snapping(true) { - setSnapFrom(SNAPPOINT_BBOX | SNAPPOINT_NODE, true); //Snap any point. In v0.45 and earlier, this was controlled in the preferences tab + setSnapFrom(SNAPPOINT_BBOX | SNAPPOINT_NODE | SNAPPOINT_GUIDE, true); //Snap any point. In v0.45 and earlier, this was controlled in the preferences tab } /* diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 793dff561..159ebc31d 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -252,7 +252,6 @@ static void sp_namedview_build(SPObject *object, SPDocument *document, Inkscape: sp_object_read_attr(object, "inkscape:snap-object-midpoints"); sp_object_read_attr(object, "inkscape:snap-bbox-edge-midpoints"); sp_object_read_attr(object, "inkscape:snap-bbox-midpoints"); - //sp_object_read_attr(object, "inkscape:snap-intersection-grid-guide"); sp_object_read_attr(object, "inkscape:snap-to-guides"); sp_object_read_attr(object, "inkscape:snap-grids"); sp_object_read_attr(object, "inkscape:snap-intersection-paths"); @@ -489,13 +488,9 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; case SP_ATTR_INKSCAPE_SNAP_FROM_GUIDE: - nv->snap_manager.snapprefs.setSnapModeGuide(value ? sp_str_to_bool(value) : FALSE); + nv->snap_manager.snapprefs.setSnapModeGuide(value ? sp_str_to_bool(value) : TRUE); object->requestModified(SP_OBJECT_MODIFIED_FLAG); break; - /*case SP_ATTR_INKSCAPE_SNAP_INTERS_GRIDGUIDE: - nv->snap_manager.snapprefs.setSnapIntersectionGG(value ? sp_str_to_bool(value) : TRUE); - object->requestModified(SP_OBJECT_MODIFIED_FLAG); - break;*/ case SP_ATTR_INKSCAPE_SNAP_INTERS_PATHS: nv->snap_manager.snapprefs.setSnapIntersectionCS(value ? sp_str_to_bool(value) : FALSE); object->requestModified(SP_OBJECT_MODIFIED_FLAG); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index ae95244cd..6b3e23579 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -100,7 +100,7 @@ DocumentProperties::DocumentProperties() //--------------------------------------------------------------- //General snap options _rcb_sgui(_("Show _guides"), _("Show or hide guides"), "showguides", _wr), - _rcbsng(_("_Snap guides while dragging"), _("While dragging a guide, snap to object nodes or bounding box corners ('Snap to nodes' or 'snap to bounding box corners' must be enabled in the 'Snap' tab; only a small part of the guide near the cursor will snap)"), + _rcbsng(_("_Snap guides while dragging"), _("While dragging a guide, snap to object nodes or bounding box corners ('Snap to nodes' or 'snap to bounding box corners' must be enabled; only a small part of the guide near the cursor will snap)"), "inkscape:snap-from-guide", _wr), _rcp_gui(_("Guide co_lor:"), _("Guideline color"), _("Color of guidelines"), "guidecolor", "guideopacity", _wr), _rcp_hgui(_("_Highlight color:"), _("Highlighted guideline color"), _("Color of a guideline when it is under mouse"), "guidehicolor", "guidehiopacity", _wr), @@ -791,6 +791,7 @@ DocumentProperties::update() _rcb_sgui.setActive (nv->showguides); _rcp_gui.setRgba32 (nv->guidecolor); _rcp_hgui.setRgba32 (nv->guidehicolor); + _rcbsng.setActive(nv->snap_manager.snapprefs.getSnapModeGuide()); //-----------------------------------------------------------snap page -- 2.30.2