=== modified file 'src/live_effects/lpe-bendpath.cpp' --- src/live_effects/lpe-bendpath.cpp 2016-08-29 17:40:59 +0000 +++ src/live_effects/lpe-bendpath.cpp 2016-09-10 02:33:57 +0000 @@ -83,7 +83,6 @@ _provides_knotholder_entities = true; apply_to_clippath_and_mask = true; concatenate_before_pwd2 = true; - _prop_scale_store = prop_scale; } LPEBendPath::~LPEBendPath() @@ -97,9 +96,6 @@ // get the item bounding box original_bbox(lpeitem); original_height = boundingbox_Y.max() - boundingbox_Y.min(); - if(_prop_scale_store != prop_scale) { - prop_scale.param_set_value(_prop_scale_store); - } } Geom::Piecewise > @@ -140,9 +136,9 @@ } if ( scale_y_rel.get_value() ) { - y*=(scaling*_prop_scale_store); + y*=(scaling*prop_scale); } else { - if (_prop_scale_store != 1.0) y *= _prop_scale_store; + if (prop_scale != 1.0) y *= prop_scale; } Piecewise > output = compose(uskeleton,x) + y*compose(n,x); @@ -204,9 +200,9 @@ Geom::Point knot_pos = this->knot->pos * item->i2dt_affine().inverse(); Geom::Coord nearest_to_ray = ray.nearestTime(knot_pos); if(nearest_to_ray == 0){ - lpe->_prop_scale_store = -Geom::distance(s , ptA)/(lpe->original_height/2.0); + lpe->prop_scale.param_set_value(-Geom::distance(s , ptA)/(lpe->original_height/2.0)); } else { - lpe->_prop_scale_store = Geom::distance(s , ptA)/(lpe->original_height/2.0); + lpe->prop_scale.param_set_value(Geom::distance(s , ptA)/(lpe->original_height/2.0)); } sp_lpe_item_update_patheffect (SP_LPE_ITEM(item), false, true); @@ -227,7 +223,7 @@ ray.setPoints(ptA,(*cubic)[1]); } ray.setAngle(ray.angle() + Geom::rad_from_deg(90)); - Geom::Point result_point = Geom::Point::polar(ray.angle(), (lpe->original_height/2.0) * lpe->_prop_scale_store) + ptA; + Geom::Point result_point = Geom::Point::polar(ray.angle(), (lpe->original_height/2.0) * lpe->prop_scale) + ptA; bp_helper_path.clear(); Geom::Path hp(result_point); === modified file 'src/live_effects/lpe-bendpath.h' --- src/live_effects/lpe-bendpath.h 2016-08-29 17:40:59 +0000 +++ src/live_effects/lpe-bendpath.h 2016-09-10 02:33:57 +0000 @@ -58,7 +58,7 @@ BoolParam vertical_pattern; Geom::Piecewise > uskeleton; Geom::Piecewise > n; - double _prop_scale_store; + void on_pattern_pasted(); LPEBendPath(const LPEBendPath&); === modified file 'src/live_effects/lpe-patternalongpath.cpp' --- src/live_effects/lpe-patternalongpath.cpp 2016-09-09 12:16:07 +0000 +++ src/live_effects/lpe-patternalongpath.cpp 2016-09-10 02:33:57 +0000 @@ -95,7 +95,7 @@ prop_scale.param_set_increments(0.01, 0.10); _provides_knotholder_entities = true; - _prop_scale_store = prop_scale; + } LPEPatternAlongPath::~LPEPatternAlongPath() @@ -111,9 +111,6 @@ if (bbox) { original_height = (*bbox)[Geom::Y].max() - (*bbox)[Geom::Y].min(); } - if(_prop_scale_store != prop_scale) { - prop_scale.param_set_value(_prop_scale_store); - } } Geom::Piecewise > @@ -216,9 +213,9 @@ x*=scaling; } if ( scale_y_rel.get_value() ) { - y*=(scaling*_prop_scale_store); + y*=(scaling*prop_scale); } else { - if (_prop_scale_store != 1.0) y *= _prop_scale_store; + if (prop_scale != 1.0) y *= prop_scale; } x += toffset; @@ -256,7 +253,7 @@ Inkscape::Preferences *prefs = Inkscape::Preferences::get(); bool transform_stroke = prefs ? prefs->getBool("/options/transform/stroke", true) : true; if (transform_stroke && !scale_y_rel) { - prop_scale.param_set_value(_prop_scale_store * ((postmul.expansionX() + postmul.expansionY()) / 2)); + prop_scale.param_set_value(prop_scale * ((postmul.expansionX() + postmul.expansionY()) / 2)); } if (postmul.isTranslation()) { pattern.param_transform_multiply(postmul, set); @@ -302,9 +299,9 @@ Geom::Point knot_pos = this->knot->pos * item->i2dt_affine().inverse(); Geom::Coord nearest_to_ray = ray.nearestTime(knot_pos); if(nearest_to_ray == 0){ - lpe->_prop_scale_store = -Geom::distance(s , ptA)/(lpe->original_height/2.0); + lpe->prop_scale.param_set_value(-Geom::distance(s , ptA)/(lpe->original_height/2.0)); } else { - lpe->_prop_scale_store = Geom::distance(s , ptA)/(lpe->original_height/2.0); + lpe->prop_scale.param_set_value(Geom::distance(s , ptA)/(lpe->original_height/2.0)); } } @@ -328,7 +325,7 @@ ray.setPoints(ptA, (*cubic)[1]); } ray.setAngle(ray.angle() + Geom::rad_from_deg(90)); - Geom::Point result_point = Geom::Point::polar(ray.angle(), (lpe->original_height/2.0) * lpe->_prop_scale_store) + ptA; + Geom::Point result_point = Geom::Point::polar(ray.angle(), (lpe->original_height/2.0) * lpe->prop_scale) + ptA; pap_helper_path.clear(); Geom::Path hp(result_point); === modified file 'src/live_effects/lpe-patternalongpath.h' --- src/live_effects/lpe-patternalongpath.h 2016-08-29 17:40:59 +0000 +++ src/live_effects/lpe-patternalongpath.h 2016-09-10 02:33:57 +0000 @@ -61,7 +61,6 @@ BoolParam prop_units; BoolParam vertical_pattern; ScalarParam fuse_tolerance; - double _prop_scale_store; void on_pattern_pasted(); LPEPatternAlongPath(const LPEPatternAlongPath&); === modified file 'src/ui/tools/freehand-base.cpp' --- src/ui/tools/freehand-base.cpp 2016-08-29 17:40:59 +0000 +++ src/ui/tools/freehand-base.cpp 2016-09-10 02:36:03 +0000 @@ -226,19 +226,6 @@ Effect::createAndApply(PATTERN_ALONG_PATH, dc->desktop->doc(), item); Effect* lpe = SP_LPE_ITEM(item)->getCurrentLPE(); static_cast(lpe)->pattern.set_new_value(newpath,true); - - // write pattern along path parameters: - lpe->getRepr()->setAttribute("copytype", "single_stretched"); - lpe->getRepr()->setAttribute("fuse_tolerance", "0"); - lpe->getRepr()->setAttribute("is_visible", "true"); - lpe->getRepr()->setAttribute("normal_offset", "0"); - lpe->getRepr()->setAttribute("prop_scale", "1"); - lpe->getRepr()->setAttribute("prop_units", "false"); - lpe->getRepr()->setAttribute("scale_y_rel", "false"); - lpe->getRepr()->setAttribute("spacing", "0"); - lpe->getRepr()->setAttribute("tang_offset", "0"); - lpe->getRepr()->setAttribute("vertical_pattern", "false"); - } static void spdc_apply_powerstroke_shape(const std::vector & points, FreehandBase *dc, SPItem *item) @@ -805,16 +792,26 @@ if (!dc->white_item) { // Attach repr + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + shapeType shape_selected = (shapeType)prefs->getInt(tool_name(dc) + "/shape", 0); SPItem *item = SP_ITEM(desktop->currentLayer()->appendChildRepr(repr)); - - spdc_check_for_and_apply_waiting_LPE(dc, item, c); - if(previous_shape_type != BEND_CLIPBOARD){ - dc->selection->set(repr); + //Bend needs the transforms applied after, Other effects best before + if((previous_shape_type == BEND_CLIPBOARD && shape_selected == LAST_APPLIED) || + shape_selected == BEND_CLIPBOARD) + { + spdc_check_for_and_apply_waiting_LPE(dc, item, c); + previous_shape_type == BEND_CLIPBOARD; } Inkscape::GC::release(repr); item->transform = SP_ITEM(desktop->currentLayer())->i2doc_affine().inverse(); item->updateRepr(); item->doWriteTransform(item->getRepr(), item->transform, NULL, true); + if((previous_shape_type != BEND_CLIPBOARD || shape_selected != LAST_APPLIED) && + shape_selected != BEND_CLIPBOARD) + { + spdc_check_for_and_apply_waiting_LPE(dc, item, c); + dc->selection->set(repr); + } if(previous_shape_type == BEND_CLIPBOARD){ repr->parent()->removeChild(repr); }