summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_audiotrack.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-02-08 01:25:06 +0000
committerCarl Hetherington <carl@carlh.net>2010-02-08 01:25:06 +0000
commitc3b5e572df797fcbe474f99c7ad4f4e499cbb9c7 (patch)
tree6d92c9e46e25baf08a89ce77dd59736d52a67848 /gtk2_ardour/editor_audiotrack.cc
parent2c16f7aa7f7b78e84399d9ed0d8cf99a84d09eb6 (diff)
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
Diffstat (limited to 'gtk2_ardour/editor_audiotrack.cc')
-rw-r--r--gtk2_ardour/editor_audiotrack.cc41
1 files changed, 10 insertions, 31 deletions
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<RouteTimeAxisView*>(*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<RouteTimeAxisView*>(*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<RouteTimeAxisView*>(*i)) != 0) {
- rtv->fast_update ();
- }
- }
+ stop_updating_meters ();
}
+
+ track_canvas_allocate (track_canvas->get_allocation());
}