From 7d0612fd5d4791988e0c0e05a2cbf1fba84fd655 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Tue, 7 Feb 2017 00:25:47 +0100 Subject: This commit fixes bug #1657874 Title Missing handles after reset of rotation center Whats the bug: In a previous commit I do, I change a event on knots from onmove to onmousedown. this seems ok but the problem were if the user click on rotation center without moving it, the onrelease event has a variable move not set and hide the current knots making the needs to switch the tools to reshow. Is in particular a big problem on little elements where the center knot have a big influence and is very easy to click on it on select. Why do this commit that broke: I want have onmousedown fired to allow meshgradient triangle knots updated on mouse down. What fixes: INstras change the place of the signal, I send back to the original position and create a new signal to fire onmousedow a knot. In the gradient code I change the previous calls from undrag to onmousedown. Fixed bugs: - https://launchpad.net/bugs/1657874 (bzr r15486) --- src/knot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/knot.cpp') diff --git a/src/knot.cpp b/src/knot.cpp index c04206dee..50fa73391 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -214,7 +214,7 @@ static int sp_knot_handler(SPCanvasItem */*item*/, GdkEvent *event, SPKnot *knot if ((event->button.button == 1) && knot->desktop && knot->desktop->event_context && !knot->desktop->event_context->space_panning) { Geom::Point const p = knot->desktop->w2d(Geom::Point(event->button.x, event->button.y)); knot->startDragging(p, (gint) event->button.x, (gint) event->button.y, event->button.time); - knot->grabbed_signal.emit(knot, event->button.state); + knot->mousedown_signal.emit(knot, event->button.state); consumed = TRUE; } break; @@ -241,7 +241,6 @@ static int sp_knot_handler(SPCanvasItem */*item*/, GdkEvent *event, SPKnot *knot if (moved) { knot->setFlag(SP_KNOT_DRAGGING, FALSE); - knot->ungrabbed_signal.emit(knot, event->button.state); } else { knot->click_signal.emit(knot, event->button.state); @@ -277,6 +276,7 @@ static int sp_knot_handler(SPCanvasItem */*item*/, GdkEvent *event, SPKnot *knot if (!moved) { knot->setFlag(SP_KNOT_DRAGGING, TRUE); + knot->grabbed_signal.emit(knot, event->button.state); } sp_event_context_snap_delay_handler(knot->desktop->event_context, NULL, knot, (GdkEventMotion *)event, Inkscape::UI::Tools::DelayedSnapEvent::KNOT_HANDLER); -- cgit v1.2.3