From: johanengelen Date: Mon, 8 Jan 2007 20:12:43 +0000 (+0000) Subject: Gradient colors are recalculated when style or offset changes of stops. (for example... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d3054304136f26c32779ae991f150b4ede185328;p=inkscape.git Gradient colors are recalculated when style or offset changes of stops. (for example when selecting a color in a swatch) Now changing colors is interactive. --- diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index 2e6d2a37c..d28f631de 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -184,7 +184,7 @@ sp_stop_set(SPObject *object, unsigned key, gchar const *value) } case SP_ATTR_OFFSET: { stop->offset = sp_svg_read_percentage(value, 0.0); - object->requestModified(SP_OBJECT_MODIFIED_FLAG); + object->requestModified(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); break; } default: { @@ -593,6 +593,10 @@ sp_gradient_modified(SPObject *object, guint flags) sp_gradient_invalidate_vector(gr); } + if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) { + sp_gradient_ensure_colors(gr); + } + if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; flags &= SP_OBJECT_MODIFIED_CASCADE;