diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-21 23:03:48 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-21 23:03:48 +0000 |
| commit | 29a2125fbad631e51c4286adf831279a7779e693 (patch) | |
| tree | cc2749bd7eaa82b6cc23aede773ba7cf9a5f7a3c /src/ui/widget/selected-style.cpp | |
| parent | Relay LPE on widgets and optionaly write on text inputs (diff) | |
| parent | Fix "swap fill and stroke" for multiple objects in selection (diff) | |
| download | inkscape-29a2125fbad631e51c4286adf831279a7779e693.tar.gz inkscape-29a2125fbad631e51c4286adf831279a7779e693.zip | |
Update to trunk
(bzr r15356.1.14)
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
| -rw-r--r-- | src/ui/widget/selected-style.cpp | 57 |
1 files changed, 1 insertions, 56 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index fa7a83732..0370d55db 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -781,62 +781,7 @@ void SelectedStyle::on_stroke_paste() { } void SelectedStyle::on_fillstroke_swap() { - SPCSSAttr *css = sp_repr_css_attr_new (); - - switch (_mode[SS_FILL]) { - case SS_NA: - case SS_MANY: - break; - case SS_NONE: - sp_repr_css_set_property (css, "stroke", "none"); - break; - case SS_UNSET: - sp_repr_css_unset_property (css, "stroke"); - break; - case SS_COLOR: - gchar c[64]; - sp_svg_write_color (c, sizeof(c), _thisselected[SS_FILL]); - sp_repr_css_set_property (css, "stroke", c); - break; - case SS_LGRADIENT: - case SS_RGRADIENT: -#ifdef WITH_MESH - case SS_MGRADIENT: -#endif - case SS_PATTERN: - sp_repr_css_set_property (css, "stroke", _paintserver_id[SS_FILL].c_str()); - break; - } - - switch (_mode[SS_STROKE]) { - case SS_NA: - case SS_MANY: - break; - case SS_NONE: - sp_repr_css_set_property (css, "fill", "none"); - break; - case SS_UNSET: - sp_repr_css_unset_property (css, "fill"); - break; - case SS_COLOR: - gchar c[64]; - sp_svg_write_color (c, sizeof(c), _thisselected[SS_STROKE]); - sp_repr_css_set_property (css, "fill", c); - break; - case SS_LGRADIENT: - case SS_RGRADIENT: -#ifdef WITH_MESH - case SS_MGRADIENT: -#endif - case SS_PATTERN: - sp_repr_css_set_property (css, "fill", _paintserver_id[SS_STROKE].c_str()); - break; - } - - sp_desktop_set_style (_desktop, css); - sp_repr_css_attr_unref (css); - DocumentUndo::done(_desktop->getDocument(), SP_VERB_DIALOG_FILL_STROKE, - _("Swap fill and stroke")); + _desktop->getSelection()->swapFillStroke(); } void SelectedStyle::on_fill_edit() { |
