summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/tools/mesh-tool.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/tools/mesh-tool.cpp b/src/ui/tools/mesh-tool.cpp
index cea508782..c6983b94a 100644
--- a/src/ui/tools/mesh-tool.cpp
+++ b/src/ui/tools/mesh-tool.cpp
@@ -1036,7 +1036,8 @@ static void sp_mesh_new_default(MeshTool &rc) {
// Get corresponding object
SPMeshGradient *mg = static_cast<SPMeshGradient *>(document->getObjectByRepr(repr));
- mg->array.create(mg, *i, (*i)->visualBounds());
+ mg->array.create(mg, *i, (fill_or_stroke == Inkscape::FOR_FILL) ?
+ (*i)->geometricBounds() : (*i)->visualBounds());
bool isText = SP_IS_TEXT(*i);
sp_style_set_property_url (*i, ((fill_or_stroke == Inkscape::FOR_FILL) ? "fill":"stroke"),
@@ -1045,6 +1046,11 @@ static void sp_mesh_new_default(MeshTool &rc) {
(*i)->requestModified(SP_OBJECT_MODIFIED_FLAG|SP_OBJECT_STYLE_MODIFIED_FLAG);
}
+ if (css) {
+ sp_repr_css_attr_unref(css);
+ css = 0;
+ }
+
DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_MESH, _("Create mesh"));
// status text; we do not track coords because this branch is run once, not all the time