From 7308f9e1e734fc54661b3d79c4ff8e8fbeb84867 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sun, 3 Nov 2019 20:02:46 +0100 Subject: refactor: Eliminate SPIString::value_default - eliminate value_default - make value private (-> _value) - add value() method --- src/ui/tools/text-tool.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ui/tools/text-tool.cpp') 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); -- cgit v1.2.3