diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-10-03 20:51:05 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-10-03 20:51:05 +0000 |
| commit | 4db35e8a6706ddece9e977e5f26d4a6867ff8cbe (patch) | |
| tree | f9711f260f694d96e26bf3216fb64f2b38611b2b /src/sp-switch.cpp | |
| parent | update to trunk (diff) | |
| parent | Merge in jabiertxof's hover information for measure tool (diff) | |
| download | inkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.tar.gz inkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.zip | |
Update to trunk
(bzr r15017.1.35)
Diffstat (limited to 'src/sp-switch.cpp')
| -rw-r--r-- | src/sp-switch.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp index d2dcde15d..d6ab1e904 100644 --- a/src/sp-switch.cpp +++ b/src/sp-switch.cpp @@ -18,7 +18,6 @@ #include "display/drawing-group.h" #include "conditions.h" -#include <sigc++/functors/ptr_fun.h> #include <sigc++/adaptors/bind.h> SPSwitch::SPSwitch() : SPGroup() { @@ -32,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; } } |
