index 30a1761bd5f9c6dcb434875f4989fd8f7465d542..681b1dbbc3bc7a4bec9cb67f8fe7bf17a0339ed7 100644 (file)
--- a/src/ui/widget/ruler.cpp
+++ b/src/ui/widget/ruler.cpp
_dragging = false;
if ( (_horiz_f ? wy : wx ) >= 0 ) {
- Inkscape::XML::Node *repr = sp_repr_new("sodipodi:guide");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(_dt->doc());
+ Inkscape::XML::Node *repr = xml_doc->createElement("sodipodi:guide");
repr->setAttribute("orientation", _horiz_f ? "horizontal" : "vertical");
double const guide_pos_dt = event_dt[ _horiz_f ? NR::Y : NR::X ];
sp_repr_set_svg_double(repr, "position", guide_pos_dt);