diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-26 01:54:08 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-26 01:54:08 +0000 |
| commit | e80a86b84d1e5cd64139df6aee147795067cb938 (patch) | |
| tree | 53fb3e0050a406d48dd4c869997db4ff92832bc1 /src/path-chemistry.cpp | |
| parent | Update to trunk (diff) | |
| parent | Patch for several issues in libuemf. (diff) | |
| download | inkscape-e80a86b84d1e5cd64139df6aee147795067cb938.tar.gz inkscape-e80a86b84d1e5cd64139df6aee147795067cb938.zip | |
Update to trunk
(bzr r13090.1.32)
Diffstat (limited to 'src/path-chemistry.cpp')
| -rw-r--r-- | src/path-chemistry.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 456af3731..a72601276 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -84,10 +84,10 @@ sp_selected_path_combine(SPDesktop *desktop) gint position = 0; char const *id = NULL; char const *transform = NULL; - gchar *style = NULL; - gchar *path_effect = NULL; + char const *style = NULL; + char const *path_effect = NULL; - SPCurve* curve = 0; + SPCurve* curve = NULL; SPItem *first = NULL; Inkscape::XML::Node *parent = NULL; @@ -115,18 +115,15 @@ sp_selected_path_combine(SPDesktop *desktop) id = first->getRepr()->attribute("id"); transform = first->getRepr()->attribute("transform"); // FIXME: merge styles of combined objects instead of using the first one's style - style = g_strdup(first->getRepr()->attribute("style")); - path_effect = g_strdup(first->getRepr()->attribute("inkscape:path-effect")); + style = first->getRepr()->attribute("style"); + path_effect = first->getRepr()->attribute("inkscape:path-effect"); //c->transform(item->transform); curve = c; } else { c->transform(item->getRelativeTransform(first)); curve->append(c, false); c->unref(); - } - // unless this is the topmost object, - if (item != first) { // reduce position only if the same parent if (item->getRepr()->parent() == parent) { position--; @@ -151,10 +148,8 @@ sp_selected_path_combine(SPDesktop *desktop) repr->setAttribute("transform", transform); } repr->setAttribute("style", style); - g_free(style); repr->setAttribute("inkscape:path-effect", path_effect); - g_free(path_effect); // set path data corresponding to new curve gchar *dstring = sp_svg_write_path(curve->get_pathvector()); @@ -371,7 +366,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; + SPDocument *document = item->document; if ( skip_all_lpeitems && SP_IS_LPE_ITEM(item) && @@ -453,12 +448,12 @@ sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_selec parent->appendChild(repr); SPObject* newObj = document->getObjectByRepr(repr); if (title && newObj) { - newObj->setTitle(title); - g_free(title); + newObj->setTitle(title); + g_free(title); } if (desc && newObj) { - newObj->setDesc(desc); - g_free(desc); + newObj->setDesc(desc); + g_free(desc); } if (highlight_color && newObj) { SP_ITEM(newObj)->setHighlightColor( highlight_color ); |
