From fe90e67c8b69a8c9ee4022b6e581eefa798b3353 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 7 Apr 2012 23:16:34 +0200 Subject: circle tool: fix shift click to reset to full circle for start angle node (bzr r11179) --- src/object-edit.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/object-edit.cpp') diff --git a/src/object-edit.cpp b/src/object-edit.cpp index 1c828e1e5..528f202ab 100644 --- a/src/object-edit.cpp +++ b/src/object-edit.cpp @@ -719,6 +719,7 @@ class ArcKnotHolderEntityStart : public KnotHolderEntity { public: virtual Geom::Point knot_get(); virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state); + virtual void knot_click(guint state); }; class ArcKnotHolderEntityEnd : public KnotHolderEntity { @@ -792,6 +793,17 @@ ArcKnotHolderEntityStart::knot_get() return sp_arc_get_xy(arc, ge->start); } +void +ArcKnotHolderEntityStart::knot_click(guint state) +{ + SPGenericEllipse *ge = SP_GENERICELLIPSE(item); + + if (state & GDK_SHIFT_MASK) { + ge->end = ge->start = 0; + (static_cast(ge))->updateRepr(); + } +} + void ArcKnotHolderEntityEnd::knot_set(Geom::Point const &p, Geom::Point const &/*origin*/, guint state) { -- cgit v1.2.3