diff options
Diffstat (limited to 'src/pencil-context.cpp')
| -rw-r--r-- | src/pencil-context.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index f17337183..691dcb098 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -229,28 +229,9 @@ pencil_handle_button_press(SPPencilContext *const pc, GdkEventButton const &beve default: /* Set first point of sequence */ if (bevent.state & GDK_CONTROL_MASK) { - /* Create object */ - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc()); - Inkscape::XML::Node *repr = xml_doc->createElement("svg:path"); - repr->setAttribute("sodipodi:type", "arc"); - SPItem *item = SP_ITEM(desktop->currentLayer()->appendChildRepr(repr)); - Inkscape::GC::release(repr); - NR::Matrix const i2d (sp_item_i2d_affine (item)); - NR::Point pp = p * i2d; - sp_repr_set_svg_double (repr, "sodipodi:cx", pp[NR::X]); - sp_repr_set_svg_double (repr, "sodipodi:cy", pp[NR::Y]); - sp_repr_set_int (repr, "sodipodi:rx", 10); - sp_repr_set_int (repr, "sodipodi:ry", 10); - - /* Set style */ - sp_desktop_apply_style_tool(desktop, repr, "tools.shapes.arc", false); - - item->updateRepr(); - desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Creating single point")); - sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_PENCIL, _("Create single point")); + freehand_create_single_dot(event_context, p, "tools.freehand.pencil", bevent.state & GDK_SHIFT_MASK); ret = true; break; - } if (anchor) { p = anchor->dp; |
