summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/freehand-base.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-03-19 20:54:30 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-03-19 20:54:30 +0000
commitc1c76126846e36fab78a51e5acec475b4de5ea44 (patch)
treedb67467f1a5b88c467bab5f1ffa10342d572b16a /src/ui/tools/freehand-base.cpp
parentupdate to trunk (diff)
downloadinkscape-c1c76126846e36fab78a51e5acec475b4de5ea44.tar.gz
inkscape-c1c76126846e36fab78a51e5acec475b4de5ea44.zip
This think fix su_v related bug on continuous paths in BSpline or Spiro mode
(bzr r11950.1.301)
Diffstat (limited to 'src/ui/tools/freehand-base.cpp')
-rw-r--r--src/ui/tools/freehand-base.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index 3f74a5147..67b603ab0 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -495,7 +495,7 @@ void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed)
// Blue2
dc->blue2_curve->reset();
sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(dc->blue2_bpath), NULL);
-
+
/* if c is empty, it might be that the user was trying to continue an existing curve and cancelled.
if this is the case and we are in bspline or spirolive the previous curve needs to be selected again because
we modify it when continuing through an anchor. */
@@ -614,6 +614,18 @@ static void spdc_flush_white(FreehandBase *dc, SPCurve *gc)
bool has_lpe = false;
Inkscape::XML::Node *repr;
+
+ /* if we are in bspline or spirolive the anchors curves, if exist, needs to be selected again because
+ we modify it when continuing through an anchor. */
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ if ( ((dc->sa && !dc->sa->curve->is_empty()) ||
+ (dc->ea && !dc->ea->curve->is_empty())) &&
+ (prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1 ||
+ prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2)
+ ) {
+ spdc_selection_modified(sp_desktop_selection(dc->desktop), 0, dc);
+ }
+
if (dc->white_item) {
repr = dc->white_item->getRepr();
has_lpe = SP_LPE_ITEM(dc->white_item)->hasPathEffectRecursive();