summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-11-25 21:10:16 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-11-25 21:10:16 +0000
commit9bbf7d5063006d3c81b7acee6d37fe30ecc67bda (patch)
tree05963176530472b77bc15a3fda3be35d3d133b44 /src/selection-chemistry.cpp
parentFix applying LPE to clones (through the "+" button in the LPE dialog). (diff)
downloadinkscape-9bbf7d5063006d3c81b7acee6d37fe30ecc67bda.tar.gz
inkscape-9bbf7d5063006d3c81b7acee6d37fe30ecc67bda.zip
More C++ string usage.
(bzr r13762)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index ca39ca4c7..bedce4e94 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -2910,7 +2910,7 @@ void sp_selection_clone_original_path_lpe(SPDesktop *desktop)
lpe_repr->setAttribute("linkedpaths", os.str().c_str());
desktop->doc()->getDefs()->getRepr()->addChild(lpe_repr, NULL); // adds to <defs> and assigns the 'id' attribute
}
- const gchar * lpe_id = lpe_repr->attribute("id");
+ std::string lpe_id_href = '#' + lpe_repr->attribute("id");
Inkscape::GC::release(lpe_repr);
// create the new path
@@ -2922,9 +2922,7 @@ void sp_selection_clone_original_path_lpe(SPDesktop *desktop)
SPObject *clone_obj = desktop->doc()->getObjectById(clone->attribute("id"));
SPLPEItem *clone_lpeitem = dynamic_cast<SPLPEItem *>(clone_obj);
if (clone_lpeitem) {
- gchar *href = g_strdup_printf("#%s", lpe_id);
- clone_lpeitem->addPathEffect(href, false);
- g_free(href);
+ clone_lpeitem->addPathEffect(lpe_id_href, false);
}
}