summaryrefslogtreecommitdiffstats
path: root/src/object-snapper.cpp
diff options
context:
space:
mode:
authorkamalpreetgrewal <grewalkamal005@gmail.com>2016-08-15 03:59:18 +0000
committerkamalpreetgrewal <grewalkamal005@gmail.com>2016-08-15 03:59:18 +0000
commit25a9ed4f38121eeb59cf15dbf19391aaef45bba3 (patch)
treee123aeae50d98a52e1ad4575b29bf3c199619e33 /src/object-snapper.cpp
parentSolve crash when deleting CSS property (diff)
parentinkview: Convert to ApplicationWindow (diff)
downloadinkscape-25a9ed4f38121eeb59cf15dbf19391aaef45bba3.tar.gz
inkscape-25a9ed4f38121eeb59cf15dbf19391aaef45bba3.zip
Merge changes from trunk
(bzr r14949.1.64)
Diffstat (limited to 'src/object-snapper.cpp')
-rw-r--r--src/object-snapper.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp
index af33415a1..b4f4024cc 100644
--- a/src/object-snapper.cpp
+++ b/src/object-snapper.cpp
@@ -84,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
@@ -94,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;
}
}
@@ -116,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();