summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-30 00:12:58 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-30 00:12:58 +0000
commit290c8499f0f609279f2d770ad7e31f4c011aa7da (patch)
tree32a33a0452cba0a90648e832d4287a80ec814f27 /src
parentFix a small issue with Attach Path (diff)
parentFix bug #1290573 and #1310802 (diff)
downloadinkscape-290c8499f0f609279f2d770ad7e31f4c011aa7da.tar.gz
inkscape-290c8499f0f609279f2d770ad7e31f4c011aa7da.zip
Fix an issue with doOnRemove not being called
(bzr r13090.1.70)
Diffstat (limited to 'src')
-rw-r--r--src/sp-lpe-item.cpp5
-rw-r--r--src/splivarot.cpp16
-rw-r--r--src/verbs.cpp4
3 files changed, 10 insertions, 15 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index 19a688ca5..aca9b9772 100644
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
@@ -454,10 +454,13 @@ void SPLPEItem::removeCurrentPathEffect(bool keep_paths)
if (!lperef)
return;
+ if (Inkscape::LivePathEffect::Effect* effect_ = this->getCurrentLPE()) {
+ effect_->doOnRemove(this);
+ }
PathEffectList new_list = *this->path_effect_list;
new_list.remove(lperef); //current lpe ref is always our 'own' pointer from the path_effect_list
std::string r = patheffectlist_write_svg(new_list);
-
+
if (!r.empty()) {
this->getRepr()->setAttribute("inkscape:path-effect", r.c_str());
} else {
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index a08809adf..8bb2a7150 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1340,10 +1340,6 @@ sp_selected_path_outline(SPDesktop *desktop)
gchar *title = item->title();
// remember description
gchar *desc = item->desc();
- // remember highlight color
- guint32 highlight_color = 0;
- if (item->isHighlightSet())
- highlight_color = item->highlight_color();
if (res->descr_cmd.size() > 1) { // if there's 0 or 1 node left, drop this path altogether
@@ -1386,9 +1382,6 @@ sp_selected_path_outline(SPDesktop *desktop)
if (desc) {
newitem->setDesc(desc);
}
- if (highlight_color && newitem) {
- newitem->setHighlightColor( highlight_color );
- }
SPShape *shape = SP_SHAPE(item);
@@ -1464,8 +1457,7 @@ sp_selected_path_outline(SPDesktop *desktop)
g_repr, xml_doc, doc );
}
}
- //bug 1290573: completely destroy the old object first to prevent
- //an ID clash, which has issues on undo
+ //bug lp:1290573 : completely destroy the old object first
curve->unref();
selection->remove(item);
item->deleteObject(false);
@@ -1476,8 +1468,7 @@ sp_selected_path_outline(SPDesktop *desktop)
} else
{
- //bug 1290573: completely destroy the old object first to prevent
- //an ID clash, which has issues on undo
+ //lp:1290573
curve->unref();
selection->remove(item);
item->deleteObject(false);
@@ -1499,9 +1490,6 @@ sp_selected_path_outline(SPDesktop *desktop)
if (desc) {
newitem->setDesc(desc);
}
- if (highlight_color && newitem) {
- newitem->setHighlightColor( highlight_color );
- }
selection->add(repr);
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 4761ea5f9..10814cea1 100644
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
@@ -1372,6 +1372,10 @@ void LayerVerb::perform(SPAction *action, void *data)
survivor = Inkscape::previous_layer(dt->currentRoot(), old_layer);
}
+ if (survivor == old_layer->lastChild()) {
+ //oops: layer_fns messed up. BADLY.
+ survivor = NULL;
+ }
// Deleting the old layer before switching layers is a hack to trigger the
// listeners of the deletion event (as happens when old_layer is deleted using the
// xml editor). See