make changes to peak-meter threshold config effective immediately
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 ();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user