X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftime_axis_view.cc;h=29cb3e613bef594fc4e4e4e3b013981c0a124bc7;hb=bb797943ddaae0a904b140fec58f6367fdf87d07;hp=6d297ef14e39514e95411d71a1fe8279bad8c755;hpb=a958dd0512a29894096e67ccd41a3d879b6bc162;p=ardour.git diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 6d297ef14e..29cb3e613b 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -40,6 +40,7 @@ #include "ardour/location.h" #include "ardour_ui.h" +#include "global_signals.h" #include "gui_thread.h" #include "public_editor.h" #include "time_axis_view.h" @@ -427,8 +428,12 @@ TimeAxisView::set_height (Height h) } void -TimeAxisView::set_height(uint32_t h) +TimeAxisView::set_height (uint32_t h) { + if (h < preset_height (HeightSmall)) { + h = preset_height (HeightSmall); + } + time_axis_vbox.property_height_request () = h; height = h; @@ -1226,14 +1231,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);