diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-07-24 23:31:44 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-07-24 23:31:44 +0000 |
| commit | fae4db6d2c975173a6768bd4984eb707265f4e43 (patch) | |
| tree | 5f2a213743a58ba45d47aeb5e49f67d3e0b78981 /src/display | |
| parent | astyle (diff) | |
| parent | 3D box tool: the shift key must not prevent snapping of the vanishing point. ... (diff) | |
| download | inkscape-fae4db6d2c975173a6768bd4984eb707265f4e43.tar.gz inkscape-fae4db6d2c975173a6768bd4984eb707265f4e43.zip | |
update to trunk
(bzr r13645.1.106)
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/curve.cpp | 5 | ||||
| -rw-r--r-- | src/display/snap-indicator.cpp | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/display/curve.cpp b/src/display/curve.cpp index 386c63166..3024d1276 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -203,8 +203,9 @@ SPCurve::moveto(double x, double y) void SPCurve::moveto(Geom::Point const &p) { - _pathv.push_back( Geom::Path() ); // for some reason Geom::Path(p) does not work... - _pathv.back().start(p); + Geom::Path path(p); + path.setStitching(true); + _pathv.push_back(path); } /** diff --git a/src/display/snap-indicator.cpp b/src/display/snap-indicator.cpp index 926b35599..17deea16d 100644 --- a/src/display/snap-indicator.cpp +++ b/src/display/snap-indicator.cpp @@ -256,7 +256,12 @@ SnapIndicator::set_new_snaptarget(Inkscape::SnappedPoint const &p, bool pre_snap "shape", SP_KNOT_SHAPE_CROSS, NULL ); - const int timeout_val = 4000; + double timeout_val = prefs->getDouble("/options/snapindicatorpersistence/value", 2.0); + if (timeout_val < 0.1) { + timeout_val = 0.1; // a zero value would mean infinite persistence (i.e. until new snap occurs) + // Besides, negatives values would ....? + } + // The snap indicator will be deleted after some time-out, and sp_canvas_item_dispose // will be called. This will set canvas->current_item to NULL if the snap indicator was @@ -272,7 +277,7 @@ SnapIndicator::set_new_snaptarget(Inkscape::SnappedPoint const &p, bool pre_snap SP_CTRL(canvasitem)->pickable = false; SP_CTRL(canvasitem)->moveto(p.getPoint()); - _snaptarget = _desktop->add_temporary_canvasitem(canvasitem, timeout_val); + _snaptarget = _desktop->add_temporary_canvasitem(canvasitem, timeout_val*1000.0); _snaptarget_is_presnap = pre_snap; // Display the tooltip, which reveals the type of snap source and the type of snap target @@ -307,7 +312,7 @@ SnapIndicator::set_new_snaptarget(Inkscape::SnappedPoint const &p, bool pre_snap SP_CANVASTEXT(canvas_tooltip)->anchor_position = TEXT_ANCHOR_CENTER; g_free(tooltip_str); - _snaptarget_tooltip = _desktop->add_temporary_canvasitem(canvas_tooltip, timeout_val); + _snaptarget_tooltip = _desktop->add_temporary_canvasitem(canvas_tooltip, timeout_val*1000.0); } // Display the bounding box, if we snapped to one |
