summaryrefslogtreecommitdiffstats
path: root/src/rect-context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rect-context.cpp')
-rw-r--r--src/rect-context.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index fd3d05a30..82eef51e7 100644
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -439,7 +439,8 @@ static void sp_rect_drag(SPRectContext &rc, NR::Point const pt, guint state)
}
/* Create object */
- Inkscape::XML::Node *repr = sp_repr_new("svg:rect");
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_EVENT_CONTEXT_DOCUMENT(&rc));
+ Inkscape::XML::Node *repr = xml_doc->createElement("svg:rect");
/* Set style */
sp_desktop_apply_style_tool (desktop, repr, "tools.shapes.rect", false);