diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-08-09 09:58:51 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-08-09 09:58:51 +0000 |
| commit | e5143d65bb57d4ce623e6220585b099e6d2ee453 (patch) | |
| tree | 4ff78f6fa8f0c1b740fd43b0ade2b91dbf9226d0 /src/ui/dialog/find.cpp | |
| parent | Remove deprecated Autotools and btool files. Please use CMake instead (diff) | |
| parent | Merged trunk (diff) | |
| download | inkscape-e5143d65bb57d4ce623e6220585b099e6d2ee453.tar.gz inkscape-e5143d65bb57d4ce623e6220585b099e6d2ee453.zip | |
Merged gsoc work. Created better data structure for selections, replaced SPObject children list, improved spray tool, split tests to separate executables
(bzr r15047)
Diffstat (limited to 'src/ui/dialog/find.cpp')
| -rw-r--r-- | src/ui/dialog/find.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp index 8b6067e82..b4f7902f5 100644 --- a/src/ui/dialog/find.cpp +++ b/src/ui/dialog/find.cpp @@ -740,22 +740,22 @@ std::vector<SPItem*> &Find::all_items (SPObject *r, std::vector<SPItem*> &l, boo return l; // we're not interested in metadata } - for (SPObject *child = r->firstChild(); child; child = child->getNext()) { - SPItem *item = dynamic_cast<SPItem *>(child); - if (item && !child->cloned && !desktop->isLayer(item)) { + for (auto& child: r->children) { + SPItem *item = dynamic_cast<SPItem *>(&child); + if (item && !child.cloned && !desktop->isLayer(item)) { if ((hidden || !desktop->itemIsHidden(item)) && (locked || !item->isLocked())) { - l.insert(l.begin(),(SPItem*)child); + l.insert(l.begin(),(SPItem*)&child); } } - l = all_items (child, l, hidden, locked); + l = all_items (&child, l, hidden, locked); } return l; } std::vector<SPItem*> &Find::all_selection_items (Inkscape::Selection *s, std::vector<SPItem*> &l, SPObject *ancestor, bool hidden, bool locked) { - std::vector<SPItem*> itemlist=s->itemList(); - for(std::vector<SPItem*>::const_reverse_iterator i=itemlist.rbegin(); itemlist.rend() != i; ++i) { + auto itemlist= s->items(); + for(auto i=boost::rbegin(itemlist); boost::rend(itemlist) != i; ++i) { SPObject *obj = *i; SPItem *item = dynamic_cast<SPItem *>(obj); g_assert(item != NULL); |
