summaryrefslogtreecommitdiffstats
path: root/src/sp-guide.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-guide.cpp')
-rw-r--r--src/sp-guide.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp
index 48596cbc0..961e53e04 100644
--- a/src/sp-guide.cpp
+++ b/src/sp-guide.cpp
@@ -35,7 +35,6 @@
#include <glibmm/i18n.h>
#include <xml/repr.h>
#include <remove-last.h>
-#include "sp-metrics.h"
#include "inkscape.h"
#include "desktop.h"
#include "sp-namedview.h"
@@ -463,10 +462,10 @@ char *sp_guide_description(SPGuide const *guide, const bool verbose)
} else {
SPNamedView *namedview = sp_document_namedview(guide->document, NULL);
- GString *position_string_x = SP_PX_TO_METRIC_STRING(guide->point_on_line[X],
- namedview->getDefaultMetric());
- GString *position_string_y = SP_PX_TO_METRIC_STRING(guide->point_on_line[Y],
- namedview->getDefaultMetric());
+ Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(guide->point_on_line[X], "px");
+ Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(guide->point_on_line[Y], "px");
+ GString *position_string_x = g_string_new(x_q.string(*namedview->doc_units).c_str());
+ GString *position_string_y = g_string_new(y_q.string(*namedview->doc_units).c_str());
gchar *shortcuts = g_strdup_printf("; %s", _("<b>Shift+drag</b> to rotate, <b>Ctrl+drag</b> to move origin, <b>Del</b> to delete"));