diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-04-25 06:19:22 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-04-25 06:19:22 +0000 |
| commit | 3867da06e763100418084c9c7ad8415e358ed5e2 (patch) | |
| tree | 2965b6fbae7ef6f72d2fe8a96643e7200e27f53b /src/event-context.cpp | |
| parent | unconditionally stop only button-1 rubberbands on mouseover (diff) | |
| download | inkscape-3867da06e763100418084c9c7ad8415e358ed5e2.tar.gz inkscape-3867da06e763100418084c9c7ad8415e358ed5e2.zip | |
a better way to start rubberband
(bzr r2962)
Diffstat (limited to 'src/event-context.cpp')
| -rw-r--r-- | src/event-context.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/event-context.cpp b/src/event-context.cpp index 76fe72636..37711e914 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -418,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: |
