From f643622c05d698103b68a0af90b96fadb021f815 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sun, 14 Dec 2008 20:49:00 +0000 Subject: 1) snap midpoints of line segments (both as source and as target) 2) snap intersections within a single shape (as source; as target was already implemented) (bzr r7008) --- src/ui/dialog/document-properties.cpp | 7 +++++-- src/ui/dialog/document-properties.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/ui') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 1bbd20136..713acc23e 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -119,6 +119,7 @@ DocumentProperties::DocumentProperties() //Applies to both nodes and guides, but not to bboxes, that's why its located here _rcbic( _("Rotation _center"), _("Consider the rotation center of an object when snapping"), "inkscape:snap-center", _wr), _rcbsm( _("_Smooth nodes"), _("Snap to smooth nodes too, instead of only snapping to cusp nodes"), "inkscape:snap-smooth-nodes", _wr), + _rcbmp( _("_Midpoints"), _("Snap midpoints of straight line segments"), "inkscape:snap-midpoints", _wr), _rcbsigg(_("_Grid with guides"), _("Snap to grid-guide intersections"), "inkscape:snap-intersection-grid-guide", _wr), _rcbsils(_("_Paths"), _("Snap to intersections of paths ('snap to paths' must be enabled, see the previous tab)"), "inkscape:snap-intersection-paths", _wr), @@ -368,7 +369,7 @@ DocumentProperties::build_snap_dtls() //Other options to locate here: e.g. visual snapping indicators on/off Gtk::Label *label_i= manage (new Gtk::Label); - label_i->set_markup (_("Snapping to intersections of")); + label_i->set_markup (_("Snapping intersections of")); Gtk::Label *label_m = manage (new Gtk::Label); label_m->set_markup (_("Special points to consider")); @@ -380,7 +381,8 @@ DocumentProperties::build_snap_dtls() 0, 0, label_m, 0, 0, &_rcbic, - 0, &_rcbsm + 0, &_rcbsm, + 0, &_rcbmp }; attach_all(_page_snap_dtls.table(), array, G_N_ELEMENTS(array)); @@ -774,6 +776,7 @@ DocumentProperties::update() _rcbsng.setActive (nv->snap_manager.snapprefs.getSnapModeGuide()); _rcbic.setActive (nv->snap_manager.snapprefs.getIncludeItemCenter()); _rcbsm.setActive (nv->snap_manager.snapprefs.getSnapSmoothNodes()); + _rcbmp.setActive (nv->snap_manager.snapprefs.getSnapMidpoints()); _rcbsigg.setActive (nv->snap_manager.snapprefs.getSnapIntersectionGG()); _rcbsils.setActive (nv->snap_manager.snapprefs.getSnapIntersectionCS()); _rcbsnop.setActive(nv->snap_manager.object.getSnapToItemPath()); diff --git a/src/ui/dialog/document-properties.h b/src/ui/dialog/document-properties.h index 2428ab24a..36a6c739b 100644 --- a/src/ui/dialog/document-properties.h +++ b/src/ui/dialog/document-properties.h @@ -112,7 +112,7 @@ protected: RegisteredCheckButton _rcbsnon, _rcbsnbbp, _rcbsnbbn, _rcbsnpb; ToleranceSlider _rsu_sno, _rsu_sn, _rsu_gusn; //--------------------------------------------------------------- - RegisteredCheckButton _rcbic, _rcbsm; + RegisteredCheckButton _rcbic, _rcbsm, _rcbmp; RegisteredCheckButton _rcbsigg, _rcbsils; //--------------------------------------------------------------- Gtk::Menu _menu; -- cgit v1.2.3