make changes to peak-meter threshold config effective immediately

This commit is contained in:
Robin Gareus 2013-07-06 16:09:38 +02:00
parent c1f56d4d7c
commit 794fa1dd03
3 changed files with 13 additions and 4 deletions

View file

@ -843,10 +843,9 @@ GainMeterBase::update_meters()
snprintf (buf, sizeof(buf), "%.1f", mpeak);
peak_display.set_label (buf);
}
if (mpeak >= Config->get_meter_peak()) {
peak_display.set_name ("MixerStripPeakDisplayPeak");
}
}
if (mpeak >= Config->get_meter_peak()) {
peak_display.set_name ("MixerStripPeakDisplayPeak");
}
}

View file

@ -192,6 +192,7 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &MeterStrip::on_theme_changed));
ColorsChanged.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed));
DPIReset.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed));
Config->ParameterChanged.connect (*this, invalidator (*this), ui_bind (&MeterStrip::parameter_changed, this, _1), gui_context());
}
MeterStrip::~MeterStrip ()
@ -417,3 +418,11 @@ MeterStrip::redraw_metrics ()
meter_ticks1_area.queue_draw();
meter_ticks2_area.queue_draw();
}
void
MeterStrip::parameter_changed (std::string const & p)
{
if (p == "meter-peak") {
max_peak = -INFINITY;
}
}

View file

@ -112,6 +112,7 @@ class MeterStrip : public Gtk::VBox, public RouteUI
bool peak_button_release (GdkEventButton*);
void parameter_changed (std::string const & p);
void redraw_metrics ();
};