summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-10-23 21:30:39 +0100
committerCarl Hetherington <cth@carlh.net>2014-10-23 21:30:39 +0100
commit550c5d0b2b04cbf834625d1acf8d2e36600fe8db (patch)
tree06ce7644ac6632f7b75351005198a2e5597ca664
parenta9fac36bee5cb70263e2df170b104a8951adcccf (diff)
Fix snap to butt up rather than giving a slight overlap.
-rw-r--r--src/wx/timeline.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index eba12c47f..2e368e57d 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -647,7 +647,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
Time const d = abs (cv->content()->end() - new_position);
if (first || d < nearest_distance) {
nearest_distance = d;
- nearest_new_position = cv->content()->end();
+ nearest_new_position = cv->content()->end() + 1;
}
}
@@ -656,7 +656,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
Time const d = abs (cv->content()->position() - (new_position + _down_view->content()->length_after_trim()));
if (d < nearest_distance) {
nearest_distance = d;
- nearest_new_position = cv->content()->position() - _down_view->content()->length_after_trim ();
+ nearest_new_position = cv->content()->position() - _down_view->content()->length_after_trim () - 1;
}
}