diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-10-02 22:44:54 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-10-02 22:44:54 +0000 |
| commit | 90e142963afd950b2868434075890054aef090b3 (patch) | |
| tree | edcaf3d0d85b614e5f327fb58c909ffee5207e26 /src/sp-switch.cpp | |
| parent | Added some widgets from caligraphic tool (diff) | |
| parent | Adjust dock size to minimum width during canvas table size allocation signal. (diff) | |
| download | inkscape-90e142963afd950b2868434075890054aef090b3.tar.gz inkscape-90e142963afd950b2868434075890054aef090b3.zip | |
Update to trunk and some fixes
(bzr r14865.1.14)
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; } } |
