summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-path_length.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2013-08-29 21:06:10 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-08-29 21:06:10 +0000
commit4d331e73a76dce7d703716093923ca01b3cc5936 (patch)
treeb444657ba269b25f60684e66858a138b74fe240d /src/live_effects/lpe-path_length.cpp
parentFix compiler warnings (diff)
parentUpdating outdated test. Fixes bug #1202271. (diff)
downloadinkscape-4d331e73a76dce7d703716093923ca01b3cc5936.tar.gz
inkscape-4d331e73a76dce7d703716093923ca01b3cc5936.zip
merge from trunk (r12487)
(bzr r11668.1.75)
Diffstat (limited to 'src/live_effects/lpe-path_length.cpp')
-rw-r--r--src/live_effects/lpe-path_length.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/live_effects/lpe-path_length.cpp b/src/live_effects/lpe-path_length.cpp
index d3edcda27..4ca380c15 100644
--- a/src/live_effects/lpe-path_length.cpp
+++ b/src/live_effects/lpe-path_length.cpp
@@ -14,7 +14,7 @@
#include <glibmm/i18n.h>
#include "live_effects/lpe-path_length.h"
-#include "sp-metrics.h"
+#include "util/units.h"
#include "2geom/sbasis-geometric.h"
@@ -52,11 +52,11 @@ LPEPathLength::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
/* convert the measured length to the correct unit ... */
double lengthval = Geom::length(pwd2_in) * scale;
- gboolean success = sp_convert_distance(&lengthval, &sp_unit_get_by_id(SP_UNIT_PX), unit);
+ lengthval = Inkscape::Util::Quantity::convert(lengthval, "px", unit.get_abbreviation());
/* ... set it as the canvas text ... */
gchar *arc_length = g_strdup_printf("%.2f %s", lengthval,
- display_unit ? (success ? unit.get_abbreviation() : "px") : "");
+ display_unit ? unit.get_abbreviation() : "");
info_text.param_setValue(arc_length);
g_free(arc_length);