From a970dc423d59ea844bdb1af48d5d9419a5e2a287 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 13 Oct 2013 00:24:05 +0200 Subject: Units: stop newing Unit objects. pass around pointers to "undeletable" Unit objects in the UnitTable. I think we should move to using indexed units, and pass around the index of the unit in the unittable, or smth like that... ? (bzr r12679) --- src/pen-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pen-context.cpp') diff --git a/src/pen-context.cpp b/src/pen-context.cpp index d67bc5e57..428ebd6d9 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -1137,7 +1137,7 @@ 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]; Inkscape::Util::Quantity q = Inkscape::Util::Quantity(Geom::L2(rel), "px"); - GString *dist = g_string_new(q.string(*desktop->namedview->doc_units).c_str()); + 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) { -- cgit v1.2.3