diff --git a/src/event-context.cpp b/src/event-context.cpp
index 0cf4f89244a6fb3b15f4e20e85ede51fbce16339..37711e9143fc89a656565280753dbb11a16fe97f 100644 (file)
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
}
gdk_window_set_cursor(w->window, ec->cursor);
}
+ ec->desktop->waiting_cursor = false;
}
/**
@@ -417,17 +418,16 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context,
&& ( abs( (gint) event->motion.y - yp ) < tolerance ) ) {
break; // do not drag if we're within tolerance from origin
}
-
- if (within_tolerance) {
- Inkscape::Rubberband::get()->start(desktop, motion_dt);
- } else {
- Inkscape::Rubberband::get()->move(motion_dt);
- }
-
// Once the user has moved farther than tolerance from the original location
// (indicating they intend to move the object, not click), then always process the
// motion notify coordinates as given (no snapping back to origin)
within_tolerance = false;
+
+ if (Inkscape::Rubberband::get()->is_started()) {
+ Inkscape::Rubberband::get()->move(motion_dt);
+ } else {
+ Inkscape::Rubberband::get()->start(desktop, motion_dt);
+ }
}
break;
case GDK_BUTTON_RELEASE:
@@ -463,8 +463,8 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context,
zoom_rb = 0;
NR::Maybe<NR::Rect> const b = Inkscape::Rubberband::get()->getRectangle();
Inkscape::Rubberband::get()->stop();
- if (b != NR::Nothing() && !within_tolerance) {
- desktop->set_display_area(b.assume(), 10);
+ if (b && !within_tolerance) {
+ desktop->set_display_area(*b, 10);
}
ret = TRUE;
}