summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/node.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-10-12 22:24:05 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-10-12 22:24:05 +0000
commita970dc423d59ea844bdb1af48d5d9419a5e2a287 (patch)
tree8f6a51df0574fe048ae7e791f276e72716aa090c /src/ui/tool/node.cpp
parentFix crash with experimental lpe tool. (diff)
downloadinkscape-a970dc423d59ea844bdb1af48d5d9419a5e2a287.tar.gz
inkscape-a970dc423d59ea844bdb1af48d5d9419a5e2a287.zip
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)
Diffstat (limited to '')
-rw-r--r--src/ui/tool/node.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index 82eb697bd..76ec68c3e 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -493,9 +493,9 @@ Glib::ustring Handle::_getDragTip(GdkEventMotion */*event*/) const
Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(dist[Geom::X], "px");
Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(dist[Geom::Y], "px");
Inkscape::Util::Quantity len_q = Inkscape::Util::Quantity(length(), "px");
- GString *x = g_string_new(x_q.string(*_desktop->namedview->doc_units).c_str());
- GString *y = g_string_new(y_q.string(*_desktop->namedview->doc_units).c_str());
- GString *len = g_string_new(len_q.string(*_desktop->namedview->doc_units).c_str());
+ GString *x = g_string_new(x_q.string(_desktop->namedview->doc_units).c_str());
+ GString *y = g_string_new(y_q.string(_desktop->namedview->doc_units).c_str());
+ GString *len = g_string_new(len_q.string(_desktop->namedview->doc_units).c_str());
Glib::ustring ret = format_tip(C_("Path handle tip",
"Move handle by %s, %s; angle %.2f°, length %s"), x->str, y->str, angle, len->str);
g_string_free(x, TRUE);
@@ -1300,10 +1300,9 @@ Glib::ustring Node::_getDragTip(GdkEventMotion */*event*/) const
Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(dist[Geom::X], "px");
Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(dist[Geom::Y], "px");
- GString *x = g_string_new(x_q.string(*_desktop->namedview->doc_units).c_str());
- GString *y = g_string_new(y_q.string(*_desktop->namedview->doc_units).c_str());
- Glib::ustring ret = format_tip(C_("Path node tip", "Move node by %s, %s"),
- x->str, y->str);
+ GString *x = g_string_new(x_q.string(_desktop->namedview->doc_units).c_str());
+ GString *y = g_string_new(y_q.string(_desktop->namedview->doc_units).c_str());
+ Glib::ustring ret = format_tip(C_("Path node tip", "Move node by %s, %s"), x->str, y->str);
g_string_free(x, TRUE);
g_string_free(y, TRUE);
return ret;