summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2016-10-18 17:07:20 +0000
committertavmjong-free <tavmjong@free.fr>2016-10-18 17:07:20 +0000
commit5a528acc28fee968aee4d79373625ed7d0fa553d (patch)
tree56bbaa1d71d3055a0a016bf70c34643c896e1fce
parent[Bug #1633999] xcf export fails if layer names contain non-ASCII characters. (diff)
downloadinkscape-5a528acc28fee968aee4d79373625ed7d0fa553d.tar.gz
inkscape-5a528acc28fee968aee4d79373625ed7d0fa553d.zip
Use geometric bounding box for fill, visual for stroke in creating mesh.
(bzr r15175)
-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