summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/splivarot.cpp16
-rw-r--r--src/verbs.cpp4
2 files changed, 14 insertions, 6 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 40f3f174a..8bb2a7150 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1457,13 +1457,21 @@ sp_selected_path_outline(SPDesktop *desktop)
g_repr, xml_doc, doc );
}
}
+ //bug lp:1290573 : completely destroy the old object first
+ curve->unref();
+ selection->remove(item);
+ item->deleteObject(false);
selection->add(g_repr);
Inkscape::GC::release(g_repr);
-
- } else {
+ } else
+ {
+ //lp:1290573
+ curve->unref();
+ selection->remove(item);
+ item->deleteObject(false);
// add the new repr to the parent
parent->appendChild(repr);
@@ -1489,10 +1497,6 @@ sp_selected_path_outline(SPDesktop *desktop)
Inkscape::GC::release(repr);
- curve->unref();
- selection->remove(item);
- item->deleteObject(false);
-
}
if (title) {
g_free(title);
diff --git a/src/verbs.cpp b/src/verbs.cpp
index ab6c25973..eee7aef75 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