summaryrefslogtreecommitdiffstats
path: root/src/gradient-context.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-04-01 01:52:46 +0000
committerJohn Smith <removethis.john.q.public@bigmail.com>2012-04-01 01:52:46 +0000
commite76b6481c69c9a84decea8bcf345a26a4a408462 (patch)
treef68bbc50a72d26f0e4daad8cb10148be16f50279 /src/gradient-context.cpp
parentapply essentials of patch by zcgucas (diff)
downloadinkscape-e76b6481c69c9a84decea8bcf345a26a4a408462.tar.gz
inkscape-e76b6481c69c9a84decea8bcf345a26a4a408462.zip
Fix for 950677 : Add stops and repeat controls to the gradient toolbar
(bzr r11134)
Diffstat (limited to 'src/gradient-context.cpp')
-rw-r--r--src/gradient-context.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp
index ec18c1273..0543f8061 100644
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -345,7 +345,7 @@ sp_gradient_context_get_stop_intervals (GrDrag *drag, GSList **these_stops, GSLi
return coords;
}
-static void
+void
sp_gradient_context_add_stops_between_selected_stops (SPGradientContext *rc)
{
SPDocument *doc = NULL;
@@ -361,6 +361,13 @@ sp_gradient_context_add_stops_between_selected_stops (SPGradientContext *rc)
GrDragger *dragger = (GrDragger *) drag->selected->data;
for (GSList const* j = dragger->draggables; j != NULL; j = j->next) {
GrDraggable *d = (GrDraggable *) j->data;
+ if (d->point_type == POINT_RG_FOCUS) {
+ /*
+ * There are 2 draggables at the center (start) of a radial gradient
+ * To avoid creating 2 seperate stops, ignore this draggable point type
+ */
+ continue;
+ }
SPGradient *gradient = sp_item_gradient (d->item, d->fill_or_stroke);
SPGradient *vector = sp_gradient_get_forked_vector_if_necessary (gradient, false);
SPStop *this_stop = sp_get_stop_i (vector, d->point_i);