diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-09-23 17:24:25 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-09-23 17:24:25 +0000 |
| commit | ac16411f213f98407fc42c1d04eb4ae6c187e4a6 (patch) | |
| tree | b8fd94caee6b202043810a7366ab3f032882a48f /src/ui/widget/style-swatch.cpp | |
| parent | add newly linked-in m4 files to .bzrignore (diff) | |
| parent | Fix for 170395 : Add Trace Bitmap to context menu of images : Focus fix (diff) | |
| download | inkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.tar.gz inkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.zip | |
merge from trunk (r11698)
(bzr r11668.1.10)
Diffstat (limited to 'src/ui/widget/style-swatch.cpp')
| -rw-r--r-- | src/ui/widget/style-swatch.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp index 1ee26e803..857ae7019 100644 --- a/src/ui/widget/style-swatch.cpp +++ b/src/ui/widget/style-swatch.cpp @@ -227,8 +227,7 @@ StyleSwatch::setWatchedTool(const char *path, bool synthesize) } -void -StyleSwatch::setStyle(SPCSSAttr *css) +void StyleSwatch::setStyle(SPCSSAttr *css) { if (_css) sp_repr_css_attr_unref (_css); @@ -239,18 +238,18 @@ StyleSwatch::setStyle(SPCSSAttr *css) _css = sp_repr_css_attr_new(); sp_repr_css_merge(_css, css); - gchar const *css_string = sp_repr_css_write_string (_css); + Glib::ustring css_string; + sp_repr_css_write_string (_css, css_string); SPStyle *temp_spstyle = sp_style_new(SP_ACTIVE_DOCUMENT); - if (css_string) - sp_style_merge_from_style_string (temp_spstyle, css_string); - + if (~css_string.empty()) { + sp_style_merge_from_style_string (temp_spstyle, css_string.c_str()); + } + setStyle (temp_spstyle); - sp_style_unref (temp_spstyle); } -void -StyleSwatch::setStyle(SPStyle *query) +void StyleSwatch::setStyle(SPStyle *query) { _place[SS_FILL].remove(); _place[SS_STROKE].remove(); |
