handle enter/leave items when zooming and scrolling occur

This commit is contained in:
Paul Davis 2013-10-31 03:10:18 -04:00
parent 7bbd28aa08
commit 7ce86cec7d
4 changed files with 20 additions and 7 deletions

View file

@ -4269,7 +4269,16 @@ Editor::set_samples_per_pixel (framecnt_t spp)
ZoomChanged (); /* EMIT_SIGNAL */ ZoomChanged (); /* EMIT_SIGNAL */
//reset_scrolling_region (); ArdourCanvas::GtkCanvasViewport* c;
c = get_time_bars_canvas();
if (c) {
c->canvas()->zoomed ();
}
c = get_track_canvas();
if (c) {
c->canvas()->zoomed ();
}
if (playhead_cursor) { if (playhead_cursor) {
playhead_cursor->set_position (playhead_cursor->current_frame ()); playhead_cursor->set_position (playhead_cursor->current_frame ());

View file

@ -1004,12 +1004,6 @@ EditorRoutes::hide_all_tracks (bool /*with_select*/)
} }
resume_redisplay (); resume_redisplay ();
/* XXX this seems like a hack and half, but its not clear where to put this
otherwise.
*/
//reset_scrolling_region ();
} }
void void

View file

@ -49,6 +49,14 @@ Canvas::scroll_to (Coord x, Coord y)
{ {
_scroll_offset_x = x; _scroll_offset_x = x;
_scroll_offset_y = y; _scroll_offset_y = y;
enter_leave_items (0); // no current mouse position
}
void
Canvas::zoomed ()
{
enter_leave_items (0); // no current mouse position
} }
/** Render an area of the canvas. /** Render an area of the canvas.

View file

@ -107,6 +107,8 @@ public:
void scroll_to (Coord x, Coord y); void scroll_to (Coord x, Coord y);
virtual Rect visible_area () const = 0; virtual Rect visible_area () const = 0;
void zoomed();
std::string indent() const; std::string indent() const;
std::string render_indent() const; std::string render_indent() const;
void dump (std::ostream&) const; void dump (std::ostream&) const;