diff options
| author | gustav_b <gustav_b@users.sourceforge.net> | 2006-12-29 01:48:12 +0000 |
|---|---|---|
| committer | gustav_b <gustav_b@users.sourceforge.net> | 2006-12-29 01:48:12 +0000 |
| commit | 37d99cd771f8dceab2fdb9ae368aae991a60fa4a (patch) | |
| tree | 66cd48f5b5ae8ff8e403058e8985e887eff36c13 /src | |
| parent | Export dialog is now always shown in view (not outside of screen) (diff) | |
| download | inkscape-37d99cd771f8dceab2fdb9ae368aae991a60fa4a.tar.gz inkscape-37d99cd771f8dceab2fdb9ae368aae991a60fa4a.zip | |
Fix for 1595030 (Stroke width after Union changed in a strange way).
(bzr r2108)
Diffstat (limited to 'src')
| -rw-r--r-- | src/splivarot.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp index 60d6113ac..1d0e4e7df 100644 --- a/src/splivarot.cpp +++ b/src/splivarot.cpp @@ -414,22 +414,37 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin return; } - // remember important aspects of the source path, to be restored - Inkscape::XML::Node *repr_source; + // get the source path object + SPObject *source; if ( bop == bool_op_diff || bop == bool_op_symdiff || bop == bool_op_cut || bop == bool_op_slice ) { if (reverseOrderForOp) { - repr_source = SP_OBJECT_REPR(il->data); + source = SP_OBJECT(il->data); } else { - repr_source = SP_OBJECT_REPR(il->next->data); + source = SP_OBJECT(il->next->data); } } else { // find out the bottom object GSList *sorted = g_slist_copy((GSList *) selection->reprList()); sorted = g_slist_sort(sorted, (GCompareFunc) sp_repr_compare_position); - repr_source = ((Inkscape::XML::Node *) sorted->data); + + source = sp_desktop_document(desktop)-> + getObjectByRepr((Inkscape::XML::Node *)sorted->data); + g_slist_free(sorted); } + + // adjust style properties that depend on a possible transform in the source object in order + // to get a correct style attribute for the new path + SPItem* item_source = SP_ITEM(source); + NR::Matrix i2d = sp_item_i2d_affine(item_source); + sp_item_adjust_stroke(item_source, i2d.expansion()); + sp_item_adjust_pattern(item_source, i2d); + sp_item_adjust_gradient(item_source, i2d); + + Inkscape::XML::Node *repr_source = SP_OBJECT_REPR(source); + + // remember important aspects of the source path, to be restored gint pos = repr_source->position(); Inkscape::XML::Node *parent = sp_repr_parent(repr_source); gchar const *id = repr_source->attribute("id"); @@ -437,7 +452,6 @@ sp_selected_path_boolop(bool_op bop, const unsigned int verb, const Glib::ustrin gchar const *mask = repr_source->attribute("mask"); gchar const *clip_path = repr_source->attribute("clip-path"); - // remove source paths selection->clear(); for (GSList *l = il; l != NULL; l = l->next) { |
