From 70829da1b189d6d8f07f12d97b9273d56dbd789e Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 17 Apr 2011 14:51:06 +0200 Subject: add new preference widget for a number with a unit. change Preferences > Steps to this new widget (bzr r10177) --- src/pen-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pen-context.cpp') diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 607bdaedc..64137d56f 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -989,7 +989,7 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) gint ret = FALSE; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - gdouble const nudge = prefs->getDoubleLimited("/options/nudgedistance/value", 2, 0, 1000); // in px + gdouble const nudge = prefs->getDoubleLimited("/options/nudgedistance/value", 2, 0, 1000, "px"); // in px switch (get_group0_keyval (&event->key)) { -- cgit v1.2.3 From ab143333746e25648b253f13c0539adff089b1b6 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Fri, 24 Jun 2011 00:22:07 +0200 Subject: Remove more of libnr (bzr r10347.1.2) --- src/pen-context.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/pen-context.cpp') diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 64137d56f..19e0351a3 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -38,7 +38,6 @@ #include "display/sp-ctrlline.h" #include "display/sodipodi-ctrl.h" #include -#include "libnr/nr-point-ops.h" #include "helper/units.h" #include "macros.h" #include "context-fns.h" @@ -913,7 +912,7 @@ pen_redraw_all (SPPenContext *const pc) if (last_seg) { Geom::CubicBezier const * cubic = dynamic_cast( last_seg ); if ( cubic && - (*cubic)[2] != to_2geom(pc->p[0]) ) + (*cubic)[2] != pc->p[0] ) { Geom::Point p2 = (*cubic)[2]; SP_CTRL(pc->c0)->moveto(p2); -- cgit v1.2.3 From f4c59e50df9090a1a4801da06f9a0021b67ce7a2 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 8 Oct 2011 22:00:37 +0200 Subject: 1) make snapping to clip/mask paths optional (see document properties dialog -> snap tab) 2) for debugging purposes: code added for showing all snap candidates 3) groundwork for tangential/perpendicular snapping (bzr r10672) --- src/pen-context.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/pen-context.cpp') diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 19e0351a3..2be2fd87b 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -311,7 +311,8 @@ spdc_endpoint_snap(SPPenContext const *const pc, Geom::Point &p, guint const sta pen_set_to_nearest_horiz_vert(pc, p, state, true); } else { // snap freely - spdc_endpoint_snap_free(pc, p, state); + boost::optional origin = pc->npoints > 0 ? pc->p[0] : boost::optional(); + spdc_endpoint_snap_free(pc, p, origin, state); // pass the origin, to allow for perpendicular / tangential snapping } } } @@ -329,7 +330,8 @@ spdc_endpoint_snap_handle(SPPenContext const *const pc, Geom::Point &p, guint co spdc_endpoint_snap_rotation(pc, p, pc->p[pc->npoints - 2], state); } else { if (!(state & GDK_SHIFT_MASK)) { //SHIFT disables all snapping, except the angular snapping above - spdc_endpoint_snap_free(pc, p, state); + boost::optional origin = pc->p[pc->npoints - 2]; + spdc_endpoint_snap_free(pc, p, origin, state); } } } -- cgit v1.2.3