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/sp-switch.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/sp-switch.cpp')
| -rw-r--r-- | src/sp-switch.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp index 1e0d81db9..d6ab1e904 100644 --- a/src/sp-switch.cpp +++ b/src/sp-switch.cpp @@ -31,9 +31,10 @@ SPSwitch::~SPSwitch() { SPObject *SPSwitch::_evaluateFirst() { SPObject *first = 0; - for (SPObject *child = this->firstChild() ; child && !first ; child = child->getNext() ) { - if (SP_IS_ITEM(child) && sp_item_evaluate(SP_ITEM(child))) { - first = child; + for (auto& child: children) { + if (SP_IS_ITEM(&child) && sp_item_evaluate(SP_ITEM(&child))) { + first = &child; + break; } } |
