tweak mixer VCA button appearance and prepare for live updates to VCA state
This commit is contained in:
@@ -83,8 +83,6 @@ using namespace ArdourMeter;
|
||||
MixerStrip* MixerStrip::_entered_mixer_strip;
|
||||
PBD::Signal1<void,MixerStrip*> MixerStrip::CatchDeletion;
|
||||
|
||||
static const uint32_t n_vca_buttons = 4;
|
||||
|
||||
MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, bool in_mixer)
|
||||
: AxisView(sess)
|
||||
, RouteUI (sess)
|
||||
@@ -649,6 +647,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
||||
|
||||
update_mute_display ();
|
||||
update_solo_display ();
|
||||
update_vca_display ();
|
||||
name_changed ();
|
||||
comment_changed ();
|
||||
route_group_changed ();
|
||||
|
||||
@@ -27,13 +27,16 @@
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
#include <gtkmm2ext/utils.h>
|
||||
|
||||
#include "ardour/route_group.h"
|
||||
#include "ardour/dB.h"
|
||||
#include "pbd/memento_command.h"
|
||||
#include "pbd/stacktrace.h"
|
||||
#include "pbd/controllable.h"
|
||||
#include "pbd/enumwriter.h"
|
||||
|
||||
#include "ardour/dB.h"
|
||||
#include "ardour/route_group.h"
|
||||
#include "ardour/vca.h"
|
||||
#include "ardour/vca_manager.h"
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "editor.h"
|
||||
#include "route_ui.h"
|
||||
@@ -1273,6 +1276,35 @@ RouteUI::update_mute_display ()
|
||||
mute_button->set_active_state (mute_active_state (_session, _route));
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::update_vca_display ()
|
||||
{
|
||||
if (!vca_button) {
|
||||
return;
|
||||
}
|
||||
|
||||
VCAList vcas (_session->vca_manager().vcas());
|
||||
string label;
|
||||
|
||||
for (VCAList::iterator v = vcas.begin(); v != vcas.end(); ++v) {
|
||||
if (_route->slaved_to (*v)) {
|
||||
if (!label.empty()) {
|
||||
label += ' ';
|
||||
}
|
||||
label += PBD::to_string ((*v)->number(), std::dec);
|
||||
}
|
||||
}
|
||||
|
||||
if (label.empty()) {
|
||||
label = _("-vca-");
|
||||
vca_button->set_active_state (Gtkmm2ext::Off);
|
||||
} else {
|
||||
vca_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
}
|
||||
|
||||
vca_button->set_text (label);
|
||||
}
|
||||
|
||||
void
|
||||
RouteUI::route_rec_enable_changed ()
|
||||
{
|
||||
|
||||
@@ -242,6 +242,8 @@ class RouteUI : public virtual AxisView
|
||||
|
||||
void update_solo_display ();
|
||||
|
||||
void update_vca_display ();
|
||||
|
||||
virtual void map_frozen ();
|
||||
|
||||
void adjust_latency ();
|
||||
|
||||
Reference in New Issue
Block a user