summaryrefslogtreecommitdiffstats
path: root/src/sp-namedview.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-10-03 20:51:05 +0000
committerjabiertxof <info@marker.es>2016-10-03 20:51:05 +0000
commit4db35e8a6706ddece9e977e5f26d4a6867ff8cbe (patch)
treef9711f260f694d96e26bf3216fb64f2b38611b2b /src/sp-namedview.cpp
parentupdate to trunk (diff)
parentMerge in jabiertxof's hover information for measure tool (diff)
downloadinkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.tar.gz
inkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.zip
Update to trunk
(bzr r15017.1.35)
Diffstat (limited to 'src/sp-namedview.cpp')
-rw-r--r--src/sp-namedview.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index 616ec3921..b9526433f 100644
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
@@ -14,14 +14,12 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "config.h"
#include <cstring>
#include <string>
#include "event-log.h"
#include <2geom/transforms.h>
#include "display/canvas-grid.h"
-#include "display/guideline.h"
#include "util/units.h"
#include "svg/svg-color.h"
#include "xml/repr.h"
@@ -248,9 +246,9 @@ void SPNamedView::build(SPDocument *document, Inkscape::XML::Node *repr) {
this->readAttr( "inkscape:lockguides" );
/* Construct guideline list */
- for (SPObject *o = this->firstChild() ; o; o = o->getNext() ) {
- if (SP_IS_GUIDE(o)) {
- SPGuide * g = SP_GUIDE(o);
+ for (auto& o: children) {
+ if (SP_IS_GUIDE(&o)) {
+ SPGuide * g = SP_GUIDE(&o);
this->guides.push_back(g);
//g_object_set(G_OBJECT(g), "color", nv->guidecolor, "hicolor", nv->guidehicolor, NULL);
g->setColor(this->guidecolor);
@@ -858,9 +856,9 @@ void sp_namedview_update_layers_from_document (SPDesktop *desktop)
}
// if that didn't work out, look for the topmost layer
if (!layer) {
- for ( SPObject *iter = document->getRoot()->firstChild(); iter ; iter = iter->getNext() ) {
- if (desktop->isLayer(iter)) {
- layer = iter;
+ for (auto& iter: document->getRoot()->children) {
+ if (desktop->isLayer(&iter)) {
+ layer = &iter;
}
}
}