summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-toolbar.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-09-22 09:59:01 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-09-22 09:59:01 +0000
commita8e76949f48267a704af633032e33d6982c682cc (patch)
treeb7363e4c0d1d41470e0b72c535487a429062a40a /src/widgets/gradient-toolbar.cpp
parentFix for 166691 : Revert fix (diff)
downloadinkscape-a8e76949f48267a704af633032e33d6982c682cc.tar.gz
inkscape-a8e76949f48267a704af633032e33d6982c682cc.zip
Fix for 367548 : Invert doesnt work on objects with gradients
(bzr r11694)
Diffstat (limited to 'src/widgets/gradient-toolbar.cpp')
-rw-r--r--src/widgets/gradient-toolbar.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index ae85ed515..cc6b04413 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -633,27 +633,7 @@ static void gr_linked_changed(GtkToggleAction *act, gpointer /*data*/)
static void gr_reverse(GtkWidget * /*button*/, gpointer data)
{
SPDesktop *desktop = static_cast<SPDesktop *>(data);
- Inkscape::Selection *selection = sp_desktop_selection(desktop);
- SPEventContext *ev = sp_desktop_event_context(desktop);
-
- if (!ev) {
- return;
- }
-
- GrDrag *drag = ev->get_drag();
-
- // 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_invert_selected_gradients(desktop, Inkscape::FOR_FILL_AND_STROKE);
}
/*