summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-11-11 13:36:20 +0000
committerCarl Hetherington <carl@carlh.net>2010-11-11 13:36:20 +0000
commit40ca64c65959f27629c47176600582763c14f660 (patch)
tree808872989a957063b4e924aa4b41c681d4c22f01 /gtk2_ardour
parent9e14ce38e0f62c885a12edbb6e360a6398f67a7a (diff)
Slight improvement to autoscroll behaviour when expanding tracks.
git-svn-id: svn://localhost/ardour2/branches/3.0@8008 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_canvas.cc2
-rw-r--r--gtk2_ardour/public_editor.h4
-rw-r--r--gtk2_ardour/time_axis_view.cc4
3 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index c49885524b..33efcbdc5a 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -544,7 +544,7 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert)
framepos_t rightmost_frame = leftmost_frame + current_page_frames();
bool startit = false;
- double ty = _drags->current_pointer_y() - get_trackview_group_vertical_offset ();
+ double const ty = _drags->current_pointer_y() - get_trackview_group_vertical_offset ();
autoscroll_y = 0;
autoscroll_x = 0;
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index fa27f5c45c..341b023c12 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -352,9 +352,9 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
#endif
virtual gdouble get_trackview_group_vertical_offset () const = 0;
- virtual gdouble get_canvas_timebars_vsize () const = 0;
- virtual ArdourCanvas::Group* get_background_group () const = 0;
+ virtual double get_canvas_timebars_vsize () const = 0;
virtual ArdourCanvas::Group* get_trackview_group () const = 0;
+ virtual ArdourCanvas::Group* get_background_group () const = 0;
virtual TimeAxisView* axis_view_from_route (boost::shared_ptr<ARDOUR::Route>) const = 0;
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 2022783928..b93831f69f 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -1230,14 +1230,14 @@ TimeAxisView::resizer_motion (GdkEventMotion* ev)
{
if (_resize_drag_start >= 0) {
/* (ab)use the DragManager to do autoscrolling; adjust the event coordinates
- into the trackview space that DragManager::motion_handler is expecting,
+ into the world coordinate space that DragManager::motion_handler is expecting,
and then fake a DragManager motion event so that when maybe_autoscroll
asks DragManager for the current pointer position it will get the correct
answers.
*/
int tx, ty;
resizer.translate_coordinates (*control_parent, ev->x, ev->y, tx, ty);
- ev->y = ty + _editor.get_canvas_timebars_vsize ();
+ ev->y = ty - _editor.get_trackview_group_vertical_offset();
_editor.drags()->motion_handler ((GdkEvent *) ev, false);
_editor.maybe_autoscroll (false, true);