summaryrefslogtreecommitdiffstats
path: root/src/gradient-drag.cpp
diff options
context:
space:
mode:
authorAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-08-09 09:58:51 +0000
committerAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-08-09 09:58:51 +0000
commite5143d65bb57d4ce623e6220585b099e6d2ee453 (patch)
tree4ff78f6fa8f0c1b740fd43b0ade2b91dbf9226d0 /src/gradient-drag.cpp
parentRemove deprecated Autotools and btool files. Please use CMake instead (diff)
parentMerged trunk (diff)
downloadinkscape-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/gradient-drag.cpp')
-rw-r--r--src/gradient-drag.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index aa4da7fcc..5b91bdc9f 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -2065,8 +2065,8 @@ void GrDrag::updateDraggers()
this->draggers.clear();
g_return_if_fail(this->selection != NULL);
- std::vector<SPItem*> list = this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); ++i) {
+ auto list = this->selection->items();
+ for (auto i = list.begin(); i != list.end(); ++i) {
SPItem *item = *i;
SPStyle *style = item->style;
@@ -2133,8 +2133,8 @@ void GrDrag::updateLines()
g_return_if_fail(this->selection != NULL);
- std::vector<SPItem*> list = this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); ++i) {
+ auto list = this->selection->items();
+ for (auto i = list.begin(); i != list.end(); ++i) {
SPItem *item = *i;
SPStyle *style = item->style;
@@ -2277,8 +2277,8 @@ void GrDrag::updateLevels()
g_return_if_fail (this->selection != NULL);
- std::vector<SPItem*> list = this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); ++i) {
+ auto list = this->selection->items();
+ for (auto i = list.begin(); i != list.end(); ++i) {
SPItem *item = *i;
Geom::OptRect rect = item->desktopVisualBounds();
if (rect) {
@@ -2534,9 +2534,9 @@ void GrDrag::deleteSelected(bool just_one)
// cannot use vector->vector.stops.size() because the vector might be invalidated by deletion of a midstop
// manually count the children, don't know if there already exists a function for this...
int len = 0;
- for ( SPObject *child = (stopinfo->vector)->firstChild() ; child ; child = child->getNext() )
+ for (auto& child: stopinfo->vector->children)
{
- if ( SP_IS_STOP(child) ) {
+ if ( SP_IS_STOP(&child) ) {
len ++;
}
}