summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/pen-tool.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-09-27 08:15:49 +0000
committerTavmjong Bah <tavmjong@free.fr>2017-09-27 08:15:49 +0000
commit40d24d185b7e050deac650960464630f9af4b073 (patch)
treeec019942c30f0ae0ee010a86c2fdc6f04af713c2 /src/ui/tools/pen-tool.cpp
parentFix error when vertical text has 'text-orientation' value 'sideways'. (diff)
parentRemove usage of GString in sp-object.cpp (diff)
downloadinkscape-40d24d185b7e050deac650960464630f9af4b073.tar.gz
inkscape-40d24d185b7e050deac650960464630f9af4b073.zip
Merge branch 'jali/inkscape-ustring_refactor'
Removes usage of GString.
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.