summaryrefslogtreecommitdiffstats
path: root/src/gradient-context.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
commit7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch)
treea306139e829118a83516af02279c9eafd3440eaa /src/gradient-context.cpp
parentHershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff)
parentTranslations.Spanish translation update by Lucas Vieites. (diff)
downloadinkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz
inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip
merge from trunk (r11955)
(bzr r11687.1.3)
Diffstat (limited to 'src/gradient-context.cpp')
-rw-r--r--src/gradient-context.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp
index aa8c8b929..231490771 100644
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -266,7 +266,7 @@ sp_gradient_context_is_over_line (SPGradientContext *rc, SPItem *item, Geom::Poi
return close;
}
-std::vector<Geom::Point>
+static std::vector<Geom::Point>
sp_gradient_context_get_stop_intervals (GrDrag *drag, GSList **these_stops, GSList **next_stops)
{
std::vector<Geom::Point> coords;
@@ -419,7 +419,7 @@ sp_gradient_context_add_stops_between_selected_stops (SPGradientContext *rc)
g_slist_free (new_stops);
}
-double sqr(double x) {return x*x;}
+static double sqr(double x) {return x*x;}
static void
sp_gradient_simplify(SPGradientContext *rc, double tolerance)
@@ -837,18 +837,7 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KEY_r:
case GDK_KEY_R:
if (MOD__SHIFT_ONLY) {
- // First try selected dragger
- if (drag && drag->selected) {
- drag->selected_reverse_vector();
- } else { // If no drag or no dragger selected, act on selection (both fill and stroke gradients)
- for (GSList const* i = selection->itemList(); i != NULL; i = i->next) {
- sp_item_gradient_reverse_vector(SP_ITEM(i->data), Inkscape::FOR_FILL);
- sp_item_gradient_reverse_vector(SP_ITEM(i->data), Inkscape::FOR_STROKE);
- }
- }
- // we did an undoable action
- DocumentUndo::done(sp_desktop_document (desktop), SP_VERB_CONTEXT_GRADIENT,
- _("Invert gradient"));
+ sp_gradient_reverse_selected_gradients(desktop);
ret = TRUE;
}
break;