diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-07-20 19:08:31 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-07-20 19:08:31 +0000 |
| commit | fdf69629c66f6c1a69d88a00bb6c1311c97b631b (patch) | |
| tree | d35f16b943cf6b1635e12d16e2452b034643fea5 /src/pen-context.cpp | |
| parent | Add string output functions for units. (diff) | |
| download | inkscape-fdf69629c66f6c1a69d88a00bb6c1311c97b631b.tar.gz inkscape-fdf69629c66f6c1a69d88a00bb6c1311c97b631b.zip | |
Ported away from and removed "sp-metrics.*".
(bzr r12380.1.47)
Diffstat (limited to 'src/pen-context.cpp')
| -rw-r--r-- | src/pen-context.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pen-context.cpp b/src/pen-context.cpp index eac2ce5d1..69abf3513 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -22,7 +22,6 @@ #include "pen-context.h" #include "sp-namedview.h" -#include "sp-metrics.h" #include "desktop.h" #include "desktop-handles.h" #include "selection.h" @@ -1184,7 +1183,8 @@ static void spdc_pen_set_angle_distance_status_message(SPPenContext *const pc, G SPDesktop *desktop = SP_EVENT_CONTEXT(pc)->desktop; Geom::Point rel = p - pc->p[pc_point_to_compare]; - GString *dist = SP_PX_TO_METRIC_STRING(Geom::L2(rel), desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity q = Inkscape::Util::Quantity(Geom::L2(rel), "px"); + GString *dist = g_string_new(q.string(*desktop->namedview->doc_units).c_str()); 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) { |
