From c3b5e572df797fcbe474f99c7ad4f4e499cbb9c7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 8 Feb 2010 01:25:06 +0000 Subject: Preserve and restore x and y origin of editor viewport in Editor state. Clean up Editor's update of various things by: 1. merging Editor's handlers of SuperRapidScreenUpdate. 2. separating out work to be done on this update and work to be done on a locate. Hopefully easier to understand this way. git-svn-id: svn://localhost/ardour2/branches/3.0@6648 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_audiotrack.cc | 41 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 31 deletions(-) (limited to 'gtk2_ardour/editor_audiotrack.cc') diff --git a/gtk2_ardour/editor_audiotrack.cc b/gtk2_ardour/editor_audiotrack.cc index ea703c415c..143da8aa08 100644 --- a/gtk2_ardour/editor_audiotrack.cc +++ b/gtk2_ardour/editor_audiotrack.cc @@ -49,12 +49,11 @@ Editor::set_show_waveforms_recording (bool yn) } } -gint -Editor::start_updating () +void +Editor::start_updating_meters () { RouteTimeAxisView* rtv; - //cerr << "Editor::start_updating () called" << endl;//DEBUG if (is_mapped() && _session) { for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { if ((rtv = dynamic_cast(*i)) != 0) { @@ -63,21 +62,16 @@ Editor::start_updating () } } - if (!meters_running) { - fast_screen_update_connection = ARDOUR_UI::SuperRapidScreenUpdate.connect (sigc::mem_fun(*this, &Editor::fast_update_strips)); - meters_running = true; - } - return 0; + meters_running = true; } -gint -Editor::stop_updating () +void +Editor::stop_updating_meters () { RouteTimeAxisView* rtv; meters_running = false; - fast_screen_update_connection.disconnect(); - //cerr << "Editor::stop_updating () called" << endl;//DEBUG + if (is_mapped() && _session) { for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { if ((rtv = dynamic_cast(*i)) != 0) { @@ -85,32 +79,17 @@ Editor::stop_updating () } } } - - return 0; } void Editor::toggle_meter_updating() { if (Config->get_show_track_meters()) { - start_updating(); + start_updating_meters (); } else { - stop_updating (); - } - track_canvas_allocate(track_canvas->get_allocation()); -} - -void -Editor::fast_update_strips () -{ - RouteTimeAxisView* rtv; - - if (is_mapped() && _session) { - for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { - if ((rtv = dynamic_cast(*i)) != 0) { - rtv->fast_update (); - } - } + stop_updating_meters (); } + + track_canvas_allocate (track_canvas->get_allocation()); } -- cgit v1.2.3