summaryrefslogtreecommitdiffstats
path: root/src/ui/tools
diff options
context:
space:
mode:
authorAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-07-13 11:36:19 +0000
committerAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-07-13 11:36:19 +0000
commitd1947e768272c703674129d5c583204ff2b59251 (patch)
treec1bf1563d0c0837cbab3733c18df0c7c82b18ff4 /src/ui/tools
parentMerged trunk (diff)
downloadinkscape-d1947e768272c703674129d5c583204ff2b59251.tar.gz
inkscape-d1947e768272c703674129d5c583204ff2b59251.zip
Second part of new SPObject children list
(bzr r14954.1.19)
Diffstat (limited to 'src/ui/tools')
-rw-r--r--src/ui/tools/box3d-tool.cpp4
-rw-r--r--src/ui/tools/connector-tool.cpp6
-rw-r--r--src/ui/tools/tweak-tool.cpp16
3 files changed, 13 insertions, 13 deletions
diff --git a/src/ui/tools/box3d-tool.cpp b/src/ui/tools/box3d-tool.cpp
index 27e755add..2adba38c5 100644
--- a/src/ui/tools/box3d-tool.cpp
+++ b/src/ui/tools/box3d-tool.cpp
@@ -118,8 +118,8 @@ static void sp_box3d_context_ensure_persp_in_defs(SPDocument *document) {
SPDefs *defs = document->getDefs();
bool has_persp = false;
- for ( SPObject *child = defs->firstChild(); child; child = child->getNext() ) {
- if (SP_IS_PERSP3D(child)) {
+ for (auto& child: defs->_children) {
+ if (SP_IS_PERSP3D(&child)) {
has_persp = true;
break;
}
diff --git a/src/ui/tools/connector-tool.cpp b/src/ui/tools/connector-tool.cpp
index b81a630e2..be8ce6d0c 100644
--- a/src/ui/tools/connector-tool.cpp
+++ b/src/ui/tools/connector-tool.cpp
@@ -1114,9 +1114,9 @@ void ConnectorTool::_setActiveShape(SPItem *item) {
// The idea here is to try and add a group's children to solidify
// connection handling. We react to path objects with only one node.
- for (SPObject *child = item->firstChild() ; child ; child = child->getNext() ) {
- if (SP_IS_PATH(child) && SP_PATH(child)->nodesInPath() == 1) {
- this->_activeShapeAddKnot((SPItem *) child);
+ for (auto& child: item->_children) {
+ if (SP_IS_PATH(&child) && SP_PATH(&child)->nodesInPath() == 1) {
+ this->_activeShapeAddKnot((SPItem *) &child);
}
}
this->_activeShapeAddKnot(item);
diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp
index 658cf4617..d048c318b 100644
--- a/src/ui/tools/tweak-tool.cpp
+++ b/src/ui/tools/tweak-tool.cpp
@@ -385,9 +385,9 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
if (dynamic_cast<SPGroup *>(item) && !dynamic_cast<SPBox3D *>(item)) {
GSList *children = NULL;
- for (SPObject *child = item->firstChild() ; child; child = child->getNext() ) {
- if (dynamic_cast<SPItem *>(static_cast<SPObject *>(child))) {
- children = g_slist_prepend(children, child);
+ for (auto& child: item->_children) {
+ if (dynamic_cast<SPItem *>(static_cast<SPObject *>(&child))) {
+ children = g_slist_prepend(children, &child);
}
}
@@ -832,8 +832,8 @@ static void tweak_colors_in_gradient(SPItem *item, Inkscape::PaintTarget fill_or
double offset_l = 0;
double offset_h = 0;
SPObject *child_prev = NULL;
- for (SPObject *child = vector->firstChild(); child; child = child->getNext()) {
- SPStop *stop = dynamic_cast<SPStop *>(child);
+ for (auto& child: vector->_children) {
+ SPStop *stop = dynamic_cast<SPStop *>(&child);
if (!stop) {
continue;
}
@@ -878,7 +878,7 @@ static void tweak_colors_in_gradient(SPItem *item, Inkscape::PaintTarget fill_or
}
offset_l = offset_h;
- child_prev = child;
+ child_prev = &child;
}
}
@@ -894,8 +894,8 @@ sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point,
bool did = false;
if (dynamic_cast<SPGroup *>(item)) {
- for (SPObject *child = item->firstChild() ; child; child = child->getNext() ) {
- SPItem *childItem = dynamic_cast<SPItem *>(child);
+ for (auto& child: item->_children) {
+ SPItem *childItem = dynamic_cast<SPItem *>(&child);
if (childItem) {
if (sp_tweak_color_recursive (mode, childItem, item_at_point,
fill_goal, do_fill,