X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Feditor_canvas.cc;h=f52f8852caad03b8e39cf3299e5b41701fb1e087;hb=95bb346926e237b903059c83a70e58ed9253eaca;hp=7da1464bf87f40d8ea29d02ecaf419b368db25f1;hpb=ded4a143db069785aa33eeb6dc9da02770e3ae8e;p=ardour.git diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 7da1464bf8..f52f8852ca 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -17,6 +17,10 @@ */ +#ifdef WAF_BUILD +#include "gtk2ardour-config.h" +#endif + #include #include #include @@ -27,6 +31,7 @@ #include "ardour_ui.h" #include "editor.h" +#include "global_signals.h" #include "waveview.h" #include "simplerect.h" #include "simpleline.h" @@ -47,6 +52,8 @@ #include "editor_routes.h" #include "editor_summary.h" #include "keyboard.h" +#include "editor_cursors.h" +#include "mouse_cursors.h" #include "i18n.h" @@ -341,8 +348,8 @@ Editor::track_canvas_size_allocated () playhead_cursor->set_length (_canvas_height); } - for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) { - (*x)->set_line_vpos (0, _canvas_height); + for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) { + i->second->canvas_height_set (_canvas_height); } vertical_adjustment.set_page_size (_canvas_height); @@ -544,7 +551,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; @@ -741,7 +748,7 @@ Editor::stop_canvas_autoscroll () bool Editor::left_track_canvas (GdkEventCrossing */*ev*/) { - DropDownKeys (); + DropDownKeys (); set_entered_track (0); set_entered_regionview (0); reset_canvas_action_sensitivity (false); @@ -792,6 +799,8 @@ Editor::set_horizontal_position (double p) _summary->set_overlays_dirty (); } + HorizontalPositionChanged (); /* EMIT SIGNAL */ + #ifndef GTKOSX if (!autoscroll_active && !_stationary_playhead) { /* force rulers and canvas to move in lock step */ @@ -920,9 +929,9 @@ Editor::horizontal_position () const void Editor::set_canvas_cursor (Gdk::Cursor* cursor, bool save) { - if (save) { - current_canvas_cursor = cursor; - } + if (save) { + current_canvas_cursor = cursor; + } if (is_drawable()) { track_canvas->get_window()->set_cursor (*cursor); @@ -934,7 +943,7 @@ Editor::track_canvas_key_press (GdkEventKey* event) { /* XXX: event does not report the modifier key pressed down, AFAICS, so use the Keyboard object instead */ if (mouse_mode == Editing::MouseZoom && Keyboard::the_keyboard().key_is_down (GDK_Control_L)) { - set_canvas_cursor (zoom_out_cursor); + set_canvas_cursor (_cursors->zoom_out); } return false; @@ -944,7 +953,7 @@ bool Editor::track_canvas_key_release (GdkEventKey* event) { if (mouse_mode == Editing::MouseZoom && !Keyboard::the_keyboard().key_is_down (GDK_Control_L)) { - set_canvas_cursor (zoom_in_cursor); + set_canvas_cursor (_cursors->zoom_in); } return false;