summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-vector.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-03-14 16:47:47 +0000
committerJabiertxof <jtx@jtx.marker.es>2016-03-14 16:47:47 +0000
commitfee7ec667cc353e1efda6a1a92f1f4715836fa4f (patch)
tree63fe115530cd3f8511b29cf2e250fcf23dc8fe08 /src/widgets/gradient-vector.cpp
parentupdate credits (diff)
parent"Relative to" option for node alignment. (diff)
downloadinkscape-fee7ec667cc353e1efda6a1a92f1f4715836fa4f.tar.gz
inkscape-fee7ec667cc353e1efda6a1a92f1f4715836fa4f.zip
update to trunk
(bzr r13682.1.32)
Diffstat (limited to 'src/widgets/gradient-vector.cpp')
-rw-r--r--src/widgets/gradient-vector.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 259d4c9af..35c1e4a8d 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -298,11 +298,11 @@ static void sp_gvs_rebuild_gui_full(SPGradientVectorSelector *gvs)
/* Pick up all gradients with vectors */
GSList *gl = NULL;
if (gvs->gr) {
- const GSList *gradients = gvs->gr->document->getResourceList("gradient");
- for (const GSList *curr = gradients; curr; curr = curr->next) {
- SPGradient* grad = SP_GRADIENT(curr->data);
+ std::set<SPObject *> gradients = gvs->gr->document->getResourceList("gradient");
+ for (std::set<SPObject *>::const_iterator it = gradients.begin(); it != gradients.end(); ++it) {
+ SPGradient* grad = SP_GRADIENT(*it);
if ( grad->hasStops() && (grad->isSwatch() == gvs->swatched) ) {
- gl = g_slist_prepend(gl, curr->data);
+ gl = g_slist_prepend(gl, *it);
}
}
}
@@ -842,7 +842,8 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s
GtkWidget *vb, *w, *f;
- g_return_val_if_fail(!gradient || SP_IS_GRADIENT(gradient), NULL);
+ g_return_val_if_fail(gradient != NULL, NULL);
+ g_return_val_if_fail(SP_IS_GRADIENT(gradient), NULL);
#if GTK_CHECK_VERSION(3,0,0)
vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, PAD);