diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-24 07:17:30 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-24 07:17:30 +0000 |
| commit | 6569c9330cb3f5378d01c4fe43c13f69d537561e (patch) | |
| tree | 3177b769003d4fba36f20364720ab7cd8e3a4db3 /src | |
| parent | Fixes some compiling bug (diff) | |
| download | inkscape-6569c9330cb3f5378d01c4fe43c13f69d537561e.tar.gz inkscape-6569c9330cb3f5378d01c4fe43c13f69d537561e.zip | |
Bug fixes
(bzr r15392.1.11)
Diffstat (limited to 'src')
| -rw-r--r-- | src/2geom/intersection-graph.cpp | 6 | ||||
| -rw-r--r-- | src/live_effects/lpe-copy_rotate.cpp | 16 | ||||
| -rw-r--r-- | src/sp-item-group.cpp | 7 |
3 files changed, 19 insertions, 10 deletions
diff --git a/src/2geom/intersection-graph.cpp b/src/2geom/intersection-graph.cpp index d469d3ffc..cac010942 100644 --- a/src/2geom/intersection-graph.cpp +++ b/src/2geom/intersection-graph.cpp @@ -410,10 +410,10 @@ PathVector PathIntersectionGraph::_getResult(bool enter_a, bool enter_b) assert(!result.back().empty()); } - /*if (n_processed != size() * 2) { + if (n_processed != size() * 2) { std::cerr << "Processed " << n_processed << " intersections, expected " << (size() * 2) << std::endl; - }*/ - assert(n_processed == size() * 2); + } + //assert(n_processed == size() * 2); return result; } diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp index 61ea7e171..fbc7933e7 100644 --- a/src/live_effects/lpe-copy_rotate.cpp +++ b/src/live_effects/lpe-copy_rotate.cpp @@ -119,7 +119,17 @@ LPECopyRotate::doAfterEffect (SPLPEItem const* lpeitem) } previous_num_copies = num_copies; } - + SPObject *elemref = NULL; + char * id = g_strdup(Glib::ustring("rotated-").append("1").append("-").append(sp_lpe_item->getRepr()->attribute("id")).c_str()); + guint counter = 0; + while(elemref = document->getObjectById(id)) { + if (SP_ITEM(elemref)->isHidden()) { + items.push_back(id); + } + id = g_strdup(Glib::ustring("rotated-").append(std::to_string(counter)).append("-").append(sp_lpe_item->getRepr()->attribute("id")).c_str()); + counter++; + } + g_free(id); double diagonal = Geom::distance(Geom::Point(boundingbox_X.min(),boundingbox_Y.min()),Geom::Point(boundingbox_X.max(),boundingbox_Y.max())); Geom::Rect bbox(Geom::Point(boundingbox_X.min(),boundingbox_Y.min()),Geom::Point(boundingbox_X.max(),boundingbox_Y.max())); double size_divider = Geom::distance(origin,bbox) + (diagonal * 2); @@ -354,7 +364,7 @@ LPECopyRotate::doBeforeEffect (SPLPEItem const* lpeitem) if (copies_to_360) { rotation_angle.param_set_value(360.0/(double)num_copies); } - if (fuse_paths && rotation_angle * num_copies > 360 && rotation_angle > 0) { + if (fuse_paths && rotation_angle * num_copies > 360.1 && rotation_angle > 0) { num_copies.param_set_value(floor(360/rotation_angle)); } if (fuse_paths && copies_to_360) { @@ -616,7 +626,7 @@ LPECopyRotate::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p { using namespace Geom; - if (num_copies == 1 && !fuse_paths) { + if ((num_copies == 1 && !fuse_paths) || split_items) { return pwd2_in; } diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index 70787708e..f2c0d2f2c 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -965,16 +965,15 @@ sp_group_perform_patheffect(SPGroup *group, SPGroup *topgroup, bool write) c->transform(i2anc_affine(subitem, topgroup)); success = topgroup->performPathEffect(c, subShape); c->transform(i2anc_affine(subitem, topgroup).inverse()); - + Inkscape::XML::Node *repr = subitem->getRepr(); if (c && success) { subShape->setCurve(c, TRUE); if (write) { - Inkscape::XML::Node *repr = subitem->getRepr(); gchar *str = sp_svg_write_path(c->get_pathvector()); repr->setAttribute("d", str); - #ifdef GROUP_VERBOSE +#ifdef GROUP_VERBOSE g_message("sp_group_perform_patheffect writes 'd' attribute"); - #endif +#endif g_free(str); } c->unref(); |
