summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-patternalongpath.cpp
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-12-29 11:58:39 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-12-29 11:58:39 +0000
commita506492cec55236e824e41656e546cc4abfef53a (patch)
tree7f8345c5f312b29099418f51b046ab6276778965 /src/live_effects/lpe-patternalongpath.cpp
parentMerge branch 'master' into powerpencilII (diff)
downloadinkscape-a506492cec55236e824e41656e546cc4abfef53a.tar.gz
inkscape-a506492cec55236e824e41656e546cc4abfef53a.zip
Add fix sugested in mailing list to allow diferent LPE on clones
Diffstat (limited to 'src/live_effects/lpe-patternalongpath.cpp')
-rw-r--r--src/live_effects/lpe-patternalongpath.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/live_effects/lpe-patternalongpath.cpp b/src/live_effects/lpe-patternalongpath.cpp
index 5be88a2b7..33c07b2cb 100644
--- a/src/live_effects/lpe-patternalongpath.cpp
+++ b/src/live_effects/lpe-patternalongpath.cpp
@@ -116,14 +116,21 @@ LPEPatternAlongPath::doBeforeEffect (SPLPEItem const* lpeitem)
if (bbox) {
original_height = (*bbox)[Geom::Y].max() - (*bbox)[Geom::Y].min();
}
- if (knot_entity) {
- if (hide_knot) {
- helper_path.clear();
- knot_entity->knot->hide();
- } else {
- knot_entity->knot->show();
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ if (desktop) {
+ Inkscape::Selection * sel = SP_ACTIVE_DESKTOP->getSelection();
+ SPItem * item = sel->singleItem();
+ if (item->getId() == sp_lpe_item->getId() && static_cast<LPEPatternAlongPath*>(sp_lpe_item->getCurrentLPE()) == this) {
+ if (knot_entity && knot_entity->knot) {
+ if (hide_knot) {
+ helper_path.clear();
+ knot_entity->knot->hide();
+ } else {
+ knot_entity->knot->show();
+ }
+ knot_entity->update_knot();
+ }
}
- knot_entity->update_knot();
}
}