summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/pen-tool.cpp
diff options
context:
space:
mode:
authorJan Lingscheid <jan.linscheid@auticon.de>2017-09-12 08:13:54 +0000
committerJan Lingscheid <jan.lingscheid@auticon.de>2017-09-21 05:46:25 +0000
commit36863a0e699b5a7cba346bca8a26e729be5a2f87 (patch)
treeaed4f939d2e0d5f6bd550fee0bb27f8dd719a285 /src/ui/tools/pen-tool.cpp
parentRemove unused GString in ui/tools/box3d-tool.cpp (diff)
downloadinkscape-36863a0e699b5a7cba346bca8a26e729be5a2f87.tar.gz
inkscape-36863a0e699b5a7cba346bca8a26e729be5a2f87.zip
Remove remaining usage of GString in ui/tools/*
Diffstat (limited to 'src/ui/tools/pen-tool.cpp')
-rw-r--r--src/ui/tools/pen-tool.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp
index 77cb5b6f8..0db5c3954 100644
--- a/src/ui/tools/pen-tool.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -1291,7 +1291,7 @@ void PenTool::_setAngleDistanceStatusMessage(Geom::Point const p, int pc_point_t
Geom::Point rel = p - this->p[pc_point_to_compare];
Inkscape::Util::Quantity q = Inkscape::Util::Quantity(Geom::L2(rel), "px");
- GString *dist = g_string_new(q.string(desktop->namedview->display_units).c_str());
+ Glib::ustring dist = q.string(desktop->namedview->display_units);
double angle = atan2(rel[Geom::Y], rel[Geom::X]) * 180 / M_PI;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if (prefs->getBool("/options/compassangledisplay/value", 0) != 0) {
@@ -1301,8 +1301,7 @@ void PenTool::_setAngleDistanceStatusMessage(Geom::Point const p, int pc_point_t
}
}
- this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, message, angle, dist->str);
- g_string_free(dist, false);
+ this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, message, angle, dist.c_str());
}
// this function changes the colors red, green and blue making them transparent or not, depending on if spiro is being used.