diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2019-11-03 19:02:46 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-11-03 19:59:20 +0000 |
| commit | 7308f9e1e734fc54661b3d79c4ff8e8fbeb84867 (patch) | |
| tree | 1c4287533b3727dcc74b6bd85de7f3834bedab7c /src/ui/tools/text-tool.cpp | |
| parent | make SP_ATTRIBUTE_IS_CSS a function (diff) | |
| download | inkscape-7308f9e1e734fc54661b3d79c4ff8e8fbeb84867.tar.gz inkscape-7308f9e1e734fc54661b3d79c4ff8e8fbeb84867.zip | |
refactor: Eliminate SPIString::value_default
- eliminate value_default
- make value private (-> _value)
- add value() method
Diffstat (limited to 'src/ui/tools/text-tool.cpp')
| -rw-r--r-- | src/ui/tools/text-tool.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp index 203ce027e..6eb02b7b5 100644 --- a/src/ui/tools/text-tool.cpp +++ b/src/ui/tools/text-tool.cpp @@ -657,7 +657,7 @@ bool TextTool::root_handler(GdkEvent* event) { SPItem *text = create_text_with_rectangle (desktop, this->p0, p1); /* Get "shape-inside" */ - gchar* shape_inside = g_strdup(text->style->shape_inside.value); + auto shape_inside = text->style->shape_inside; /* Set style */ sp_desktop_apply_style_tool(desktop, text->getRepr(), "/tools/text", true); @@ -670,8 +670,7 @@ bool TextTool::root_handler(GdkEvent* event) { text->setCSS(css,"style"); sp_repr_css_attr_unref(css); /* Restore "shape-inside" */ - text->style->shape_inside.read( shape_inside ); - g_free( shape_inside ); + text->style->shape_inside = shape_inside; text->updateRepr(); desktop->getSelection()->set(text); |
