Fix connect/disconnect of meter updating, and keep meters visible for now, to get some feedback as to which is better

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2699 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Doug McLain 2007-11-19 20:56:29 +00:00
parent bae0736baf
commit f265a08604
7 changed files with 24 additions and 9 deletions

View file

@ -417,7 +417,7 @@ ARDOUR_UI::install_actions ()
ActionManager::register_toggle_action (option_actions, X_("RegionEquivalentsOverlap"), _("Region equivalents overlap"), mem_fun (*this, &ARDOUR_UI::toggle_RegionEquivalentsOverlap));
ActionManager::register_toggle_action (option_actions, X_("PrimaryClockDeltaEditCursor"), _("Primary Clock delta to edit point"), mem_fun (*this, &ARDOUR_UI::toggle_PrimaryClockDeltaEditCursor));
ActionManager::register_toggle_action (option_actions, X_("SecondaryClockDeltaEditCursor"), _("Secondary Clock delta to edit point"), mem_fun (*this, &ARDOUR_UI::toggle_SecondaryClockDeltaEditCursor));
ActionManager::register_toggle_action (option_actions, X_("ShowTrackMeters"), _("Display Editor Meters"), mem_fun (*this, &ARDOUR_UI::toggle_ShowTrackMeters));
ActionManager::register_toggle_action (option_actions, X_("ShowTrackMeters"), _("Enable Editor Meters"), mem_fun (*this, &ARDOUR_UI::toggle_ShowTrackMeters));
ActionManager::register_toggle_action (option_actions, X_("OnlyCopyImportedFiles"), _("Always copy imported files"), mem_fun (*this, &ARDOUR_UI::toggle_only_copy_imported_files));
RadioAction::Group denormal_group;

View file

@ -184,7 +184,7 @@ Editor::Editor ()
range_mark_label (_("Range Markers")),
transport_mark_label (_("Loop/Punch Ranges")),
edit_packer (3, 3, false),
edit_packer (3, 3, true),
/* the values here don't matter: layout widgets
reset them as needed.
@ -209,7 +209,8 @@ Editor::Editor ()
/* nudge */
nudge_clock (X_("nudge"), false, X_("NudgeClock"), true, true)
nudge_clock (X_("nudge"), false, X_("NudgeClock"), true, true),
meters_running(false)
{
constructed = false;

View file

@ -1953,6 +1953,7 @@ class Editor : public PublicEditor
gint stop_updating ();
void toggle_meter_updating();
void fast_update_strips ();
bool meters_running;
};

View file

@ -106,17 +106,21 @@ Editor::start_updating ()
}
}
}
fast_screen_update_connection = ARDOUR_UI::instance()->SuperRapidScreenUpdate.connect (mem_fun(*this, &Editor::fast_update_strips));
if (!meters_running) {
fast_screen_update_connection = ARDOUR_UI::SuperRapidScreenUpdate.connect (mem_fun(*this, &Editor::fast_update_strips));
meters_running = true;
}
return 0;
}
gint
Editor::stop_updating ()
{
fast_screen_update_connection.disconnect();
AudioTimeAxisView* atv;
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) {

View file

@ -978,3 +978,10 @@ void GainMeter::setup_atv_meter (int len)
}
}
void GainMeter::clear_meters ()
{
for (vector<MeterInfo>::iterator i = meters.begin(); i < meters.end(); i++) {
(*i).meter->clear();
}
}

View file

@ -75,6 +75,7 @@ class GainMeter : public Gtk::VBox
void set_fader_name (const char * name);
void setup_atv_meter (int);
void clear_meters ();
private:

View file

@ -1793,7 +1793,8 @@ RouteTimeAxisView::fast_update ()
void
RouteTimeAxisView::hide_meter ()
{
gpm.hide ();
//gpm.hide ();
gpm.clear_meters ();
}
void