diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:01:17 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:01:17 +0000 |
| commit | e7248b2fa042f42a5c4dd14cd86ab6a5b4524059 (patch) | |
| tree | 9097520c54e355ded9bd0b4d6618af4e8dacdd91 /src/object-snapper.cpp | |
| parent | updated to latest trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.tar.gz inkscape-e7248b2fa042f42a5c4dd14cd86ab6a5b4524059.zip | |
updated to latest trunk
(bzr r14876.2.4)
Diffstat (limited to 'src/object-snapper.cpp')
| -rw-r--r-- | src/object-snapper.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 3e559ee7a..b4f4024cc 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -14,9 +14,6 @@ #include "svg/svg.h" #include <2geom/path-intersection.h> -#include <2geom/pathvector.h> -#include <2geom/point.h> -#include <2geom/rect.h> #include <2geom/line.h> #include <2geom/circle.h> #include <2geom/path-sink.h> @@ -24,9 +21,7 @@ #include "sp-namedview.h" #include "sp-image.h" #include "sp-item-group.h" -#include "sp-item.h" #include "sp-use.h" -#include "display/curve.h" #include "inkscape.h" #include "preferences.h" #include "sp-text.h" @@ -34,7 +29,6 @@ #include "text-editing.h" #include "sp-clippath.h" #include "sp-mask.h" -#include "helper/geom-curves.h" #include "desktop.h" #include "sp-root.h" @@ -90,9 +84,9 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, Geom::Rect bbox_to_snap_incl = bbox_to_snap; // _incl means: will include the snapper tolerance bbox_to_snap_incl.expandBy(getSnapperTolerance()); // see? - for ( SPObject *o = parent->firstChild(); o; o = o->getNext() ) { + for (auto& o: parent->children) { g_assert(dt != NULL); - SPItem *item = dynamic_cast<SPItem *>(o); + SPItem *item = dynamic_cast<SPItem *>(&o); if (item && !(dt->itemIsHidden(item) && !clip_or_mask)) { // Snapping to items in a locked layer is allowed // Don't snap to hidden objects, unless they're a clipped path or a mask @@ -100,7 +94,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, std::vector<SPItem const *>::const_iterator i; if (it != NULL) { i = it->begin(); - while (i != it->end() && *i != o) { + while (i != it->end() && *i != &o) { ++i; } } @@ -122,7 +116,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, } if (dynamic_cast<SPGroup *>(item)) { - _findCandidates(o, it, false, bbox_to_snap, clip_or_mask, additional_affine); + _findCandidates(&o, it, false, bbox_to_snap, clip_or_mask, additional_affine); } else { Geom::OptRect bbox_of_item; Preferences *prefs = Preferences::get(); |
