summaryrefslogtreecommitdiffstats
path: root/src/path-chemistry.cpp
diff options
context:
space:
mode:
authorJeff Schiller <codedread@gmail.com>2008-08-24 13:16:51 +0000
committerjeff_schiller <jeff_schiller@users.sourceforge.net>2008-08-24 13:16:51 +0000
commit9d1004a8adea809dee45ebeb038a12c9f343edcf (patch)
tree3a4bb30ec581b4f5dde831a13556edac8af4c17d /src/path-chemistry.cpp
parentadding my name as per discussions with Aaron Spike (diff)
downloadinkscape-9d1004a8adea809dee45ebeb038a12c9f343edcf.tar.gz
inkscape-9d1004a8adea809dee45ebeb038a12c9f343edcf.zip
Fix for Bug 238113 (preserve title/desc for various Inkscape operations)
(bzr r6712)
Diffstat (limited to 'src/path-chemistry.cpp')
-rw-r--r--src/path-chemistry.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 4c459ba64..32a7968b2 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -339,6 +339,7 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec
items = items->next) {
SPItem *item = SP_ITEM(items->data);
+ SPDocument *document = item->document;
if (SP_IS_PATH(item) && !SP_PATH(item)->original_curve) {
continue; // already a path, and no path effect
@@ -387,6 +388,10 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec
Inkscape::XML::Node *parent = SP_OBJECT_REPR(item)->parent();
// remember id
char const *id = SP_OBJECT_REPR(item)->attribute("id");
+ // remember title
+ gchar *title = item->title();
+ // remember description
+ gchar *desc = item->desc();
// It's going to resurrect, so we delete without notifying listeners.
SP_OBJECT(item)->deleteObject(false);
@@ -395,6 +400,16 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec
repr->setAttribute("id", id);
// add the new repr to the parent
parent->appendChild(repr);
+ SPObject* newObj = document->getObjectByRepr(repr);
+ if (title && newObj) {
+ newObj->setTitle(title);
+ g_free(title);
+ }
+ if (desc && newObj) {
+ newObj->setDesc(desc);
+ g_free(desc);
+ }
+
// move to the saved position
repr->setPosition(pos > 0 ? pos : 0);