2 * Copyright (C) 2006-2012 David Robillard <d@drobilla.net>
3 * Copyright (C) 2007-2016 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2009-2010 Carl Hetherington <carl@carlh.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include "ardour/rc_configuration.h"
23 #include "canvas/canvas.h"
27 #include "audio_time_axis.h"
28 #include "route_time_axis.h"
29 #include "audio_region_view.h"
30 #include "selection.h"
31 #include "ui_config.h"
35 using namespace ARDOUR;
39 Editor::start_updating_meters ()
41 RouteTimeAxisView* rtv;
43 if (contents().is_mapped() && _session) {
44 for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
45 if ((rtv = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) {
51 meters_running = true;
55 Editor::stop_updating_meters ()
57 RouteTimeAxisView* rtv;
59 meters_running = false;
61 if (contents().is_mapped() && _session) {
62 for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
63 if ((rtv = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) {
71 Editor::toggle_meter_updating()
74 if (UIConfiguration::instance().get_show_track_meters()) {
75 start_updating_meters ();
77 stop_updating_meters ();
80 track_canvas_viewport_allocate (_track_canvas->get_allocation());