summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-toolbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/gradient-toolbar.cpp')
-rw-r--r--src/widgets/gradient-toolbar.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index a395d1954..c4b2ed59a 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -720,9 +720,9 @@ static void select_stop_by_drag(GtkWidget *combo_box, SPGradient *gradient, Tool
static void select_stop_in_list( GtkWidget *combo_box, SPGradient *gradient, SPStop *new_stop, GtkWidget *data, gboolean block)
{
int i = 0;
- for ( SPObject *ochild = gradient->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
- if (ochild == new_stop) {
+ for (auto& ochild: gradient->_children) {
+ if (SP_IS_STOP(&ochild)) {
+ if (&ochild == new_stop) {
blocked = block;
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box) , i);
gr_stop_set_offset(GTK_COMBO_BOX(combo_box), data);
@@ -765,9 +765,9 @@ static gboolean update_stop_list( GtkWidget *stop_combo, SPGradient *gradient, S
/* Populate the combobox store */
std::vector<SPObject *> sl;
if ( gradient->hasStops() ) {
- for ( SPObject *ochild = gradient->firstChild() ; ochild ; ochild = ochild->getNext() ) {
- if (SP_IS_STOP(ochild)) {
- sl.push_back(ochild);
+ for (auto& ochild: gradient->_children) {
+ if (SP_IS_STOP(&ochild)) {
+ sl.push_back(&ochild);
}
}
}