diff options
Diffstat (limited to 'src/gradient-chemistry.cpp')
| -rw-r--r-- | src/gradient-chemistry.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp index 27f4d7a98..cf75f6cf0 100644 --- a/src/gradient-chemistry.cpp +++ b/src/gradient-chemistry.cpp @@ -31,7 +31,7 @@ #include "document-undo.h" #include "desktop.h" #include "desktop-style.h" -#include "desktop-handles.h" + #include "ui/tools/tool-base.h" #include "selection.h" #include "verbs.h" @@ -868,9 +868,8 @@ void sp_item_gradient_stop_set_style(SPItem *item, GrPointType point_type, guint gchar const* color_str = sp_repr_css_property( stop, "stop-color", NULL ); if( color_str ) { SPColor color( 0 ); - SPStyle* style = sp_style_new(0); SPIPaint paint; - paint.read( color_str, *style ); + paint.read( color_str ); if( paint.isColor() ) { color = paint.value.color; } @@ -1569,20 +1568,20 @@ SPGradient *sp_gradient_vector_for_object( SPDocument *const doc, SPDesktop *con void sp_gradient_invert_selected_gradients(SPDesktop *desktop, Inkscape::PaintTarget fill_or_stroke) { - Inkscape::Selection *selection = sp_desktop_selection(desktop); + Inkscape::Selection *selection = desktop->getSelection(); for (GSList const* i = selection->itemList(); i != NULL; i = i->next) { sp_item_gradient_invert_vector_color(SP_ITEM(i->data), fill_or_stroke); } // we did an undoable action - DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_GRADIENT, + DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_GRADIENT, _("Invert gradient colors")); } void sp_gradient_reverse_selected_gradients(SPDesktop *desktop) { - Inkscape::Selection *selection = sp_desktop_selection(desktop); + Inkscape::Selection *selection = desktop->getSelection(); Inkscape::UI::Tools::ToolBase *ev = desktop->getEventContext(); if (!ev) { @@ -1602,7 +1601,7 @@ void sp_gradient_reverse_selected_gradients(SPDesktop *desktop) } // we did an undoable action - DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_GRADIENT, + DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_GRADIENT, _("Reverse gradient")); } |
