diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-23 22:40:10 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-23 22:40:10 +0000 |
| commit | 8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8 (patch) | |
| tree | 598923b2b554aeaf77457a83c399c616a7ecc162 /src/ui/widget | |
| parent | Remove unnecesatry text parameter (diff) | |
| parent | fix nodes reverting back during editing (diff) | |
| download | inkscape-8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8.tar.gz inkscape-8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8.zip | |
Add fixes sugested by Martin Owens
(bzr r15392.1.7)
Diffstat (limited to 'src/ui/widget')
| -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() { |
