summaryrefslogtreecommitdiffstats
path: root/src/splivarot.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-12 12:56:04 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-12 12:56:04 +0000
commit13c192e2fa564c0a743e13e30b1cf6de9b1a39a6 (patch)
tree3e2b6a003977c53609cac33d16abf38de4954c5f /src/splivarot.cpp
parentUpdate to trunk (diff)
downloadinkscape-13c192e2fa564c0a743e13e30b1cf6de9b1a39a6.tar.gz
inkscape-13c192e2fa564c0a743e13e30b1cf6de9b1a39a6.zip
Reverted swatches
Removed a toy effect (not ready yet) Fixed a bug with Livarot General cleanup (bzr r13090.1.23)
Diffstat (limited to 'src/splivarot.cpp')
-rw-r--r--src/splivarot.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 5c7b389ff..1eab73b62 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1339,6 +1339,10 @@ 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
@@ -1381,6 +1385,9 @@ sp_selected_path_outline(SPDesktop *desktop)
if (desc) {
newitem->setDesc(desc);
}
+ if (highlight_color && newitem) {
+ newitem->setHighlightColor( highlight_color );
+ }
SPShape *shape = SP_SHAPE(item);
@@ -1456,13 +1463,23 @@ 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
+ curve->unref();
+ selection->remove(item);
+ item->deleteObject(false);
selection->add(g_repr);
Inkscape::GC::release(g_repr);
-
- } else {
+ } else
+ {
+ //bug 1290573: completely destroy the old object first to prevent
+ //an ID clash, which has issues on undo
+ curve->unref();
+ selection->remove(item);
+ item->deleteObject(false);
// add the new repr to the parent
parent->appendChild(repr);
@@ -1481,6 +1498,9 @@ sp_selected_path_outline(SPDesktop *desktop)
if (desc) {
newitem->setDesc(desc);
}
+ if (highlight_color && newitem) {
+ newitem->setHighlightColor( highlight_color );
+ }
selection->add(repr);
@@ -1488,10 +1508,6 @@ sp_selected_path_outline(SPDesktop *desktop)
Inkscape::GC::release(repr);
- curve->unref();
- selection->remove(item);
- item->deleteObject(false);
-
}
if (title) {
g_free(title);