diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-08-06 18:54:40 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-08-06 18:54:40 +0000 |
| commit | bb88a2cb94ec34ee838a972bab17ca05ba92d1da (patch) | |
| tree | 4b4580dbe1bec0968254d1b362611ab57ad3c223 /src/sp-guide.cpp | |
| parent | init SPStyle better: fixes a bunch of bugs resulting from improper re-init of... (diff) | |
| parent | Fixed bug in page sizer. (diff) | |
| download | inkscape-bb88a2cb94ec34ee838a972bab17ca05ba92d1da.tar.gz inkscape-bb88a2cb94ec34ee838a972bab17ca05ba92d1da.zip | |
Merge Google Summer of Code unit refactor.
(bzr r12471)
Diffstat (limited to 'src/sp-guide.cpp')
| -rw-r--r-- | src/sp-guide.cpp | 9 |
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")); |
