diff options
Diffstat (limited to 'src/gradient-drag.cpp')
| -rw-r--r-- | src/gradient-drag.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index cb2bd737f..b22714959 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -1155,7 +1155,7 @@ static void gr_knot_clicked_handler(SPKnot */*knot*/, guint state, gpointer data break; default: - break; + return; } @@ -2082,9 +2082,9 @@ void GrDrag::updateDraggers() this->draggers = NULL; g_return_if_fail(this->selection != NULL); - - for (GSList const* i = this->selection->itemList(); i != NULL; i = i->next) { - SPItem *item = SP_ITEM(i->data); + std::vector<SPItem*> list = this->selection->itemList(); + for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); i++) { + SPItem *item = *i; SPStyle *style = item->style; if (style && (style->fill.isPaintserver())) { @@ -2151,9 +2151,9 @@ void GrDrag::updateLines() g_return_if_fail(this->selection != NULL); - for (GSList const* i = this->selection->itemList(); i != NULL; i = i->next) { - - SPItem *item = SP_ITEM(i->data); + std::vector<SPItem*> list = this->selection->itemList(); + for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); i++) { + SPItem *item = *i; SPStyle *style = item->style; @@ -2295,8 +2295,9 @@ void GrDrag::updateLevels() g_return_if_fail (this->selection != NULL); - for (GSList const* i = this->selection->itemList(); i != NULL; i = i->next) { - SPItem *item = SP_ITEM(i->data); + std::vector<SPItem*> list = this->selection->itemList(); + for (std::vector<SPItem*>::const_iterator i = list.begin(); i != list.end(); i++) { + SPItem *item = *i; Geom::OptRect rect = item->desktopVisualBounds(); if (rect) { // Remember the edges of the bbox and the center axis |
