From 6c492dc798047a6b3a79e1feb2f79a68b180d7a8 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 28 Aug 2011 20:42:03 +0200 Subject: Tie the snapping of rectangle corners and quadrant points of ellipses to the buttons for cusp and smooth nodes (bzr r10588) --- src/snap-preferences.cpp | 6 ++++-- src/widgets/toolbox.cpp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/snap-preferences.cpp b/src/snap-preferences.cpp index a1d4b62fa..fa5903c37 100644 --- a/src/snap-preferences.cpp +++ b/src/snap-preferences.cpp @@ -143,8 +143,10 @@ void Inkscape::SnapPreferences::_mapTargetToArrayIndex(Inkscape::SnapTargetType } else if (target & SNAPTARGET_NODE_CATEGORY) { group_on = getSnapModeNode(); // Only if the group with path/node sources/targets has been enabled, then we might snap to any of the nodes/paths - if (target == SNAPTARGET_RECT_CORNER || target == SNAPTARGET_ELLIPSE_QUADRANT_POINT) { // Don't have their own button; on when the group is on - target = SNAPTARGET_NODE_CATEGORY; + if (target == SNAPTARGET_RECT_CORNER) { + target = SNAPTARGET_NODE_CUSP; + } else if (target == SNAPTARGET_ELLIPSE_QUADRANT_POINT) { + target = SNAPTARGET_NODE_SMOOTH; } diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 41e6eb626..d2753fadf 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2351,7 +2351,7 @@ void setup_snap_toolbox(GtkWidget *toolbox, SPDesktop *desktop) { InkToggleAction* act = ink_toggle_action_new("ToggleSnapToItemNode", - _("To nodes"), _("Snap cusp nodes"), INKSCAPE_ICON("snap-nodes-cusp"), secondarySize, + _("To nodes"), _("Snap cusp nodes, incl. rectangle corners"), INKSCAPE_ICON("snap-nodes-cusp"), secondarySize, SP_ATTR_INKSCAPE_SNAP_NODE_CUSP); gtk_action_group_add_action( mainActions->gobj(), GTK_ACTION( act ) ); @@ -2360,7 +2360,7 @@ void setup_snap_toolbox(GtkWidget *toolbox, SPDesktop *desktop) { InkToggleAction* act = ink_toggle_action_new("ToggleSnapToSmoothNodes", - _("Smooth nodes"), _("Snap smooth nodes"), INKSCAPE_ICON("snap-nodes-smooth"), + _("Smooth nodes"), _("Snap smooth nodes, incl. quadrant points of ellipses"), INKSCAPE_ICON("snap-nodes-smooth"), secondarySize, SP_ATTR_INKSCAPE_SNAP_NODE_SMOOTH); gtk_action_group_add_action( mainActions->gobj(), GTK_ACTION( act ) ); -- cgit v1.2.3