Update labels in MIDI Automation Lanes when MIDNAM changes
This commit is contained in:
parent
4130bc3a86
commit
a3af5e31f1
@ -574,6 +574,22 @@ AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AutomationTimeAxisView::update_name_from_param ()
|
||||||
|
{
|
||||||
|
/* Note that this is intended for MidiTrack::describe_parameter()
|
||||||
|
* -> instrument_info().get_controller_name()
|
||||||
|
* It does not work with parent/plug_name for plugins.
|
||||||
|
*/
|
||||||
|
boost::shared_ptr<ARDOUR::Route> r = boost::dynamic_pointer_cast<ARDOUR::Route> (_stripable);
|
||||||
|
if (!r) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_name = r->describe_parameter(_parameter);
|
||||||
|
set_tooltip (controls_ebox, _name);
|
||||||
|
name_label.set_text (_name);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AutomationTimeAxisView::set_samples_per_pixel (double fpp)
|
AutomationTimeAxisView::set_samples_per_pixel (double fpp)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
TimeAxisView& parent,
|
TimeAxisView& parent,
|
||||||
bool show_regions,
|
bool show_regions,
|
||||||
ArdourCanvas::Canvas& canvas,
|
ArdourCanvas::Canvas& canvas,
|
||||||
const std::string & name, /* translatable */
|
const std::string & name = "", /* translatable */
|
||||||
const std::string & plug_name = "");
|
const std::string & plug_name = "");
|
||||||
|
|
||||||
~AutomationTimeAxisView();
|
~AutomationTimeAxisView();
|
||||||
@ -82,6 +82,7 @@ public:
|
|||||||
void set_samples_per_pixel (double);
|
void set_samples_per_pixel (double);
|
||||||
std::string name() const { return _name; }
|
std::string name() const { return _name; }
|
||||||
Gdk::Color color () const;
|
Gdk::Color color () const;
|
||||||
|
void update_name_from_param ();
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::Stripable> stripable() const;
|
boost::shared_ptr<ARDOUR::Stripable> stripable() const;
|
||||||
ARDOUR::PresentationInfo const & presentation_info () const;
|
ARDOUR::PresentationInfo const & presentation_info () const;
|
||||||
|
@ -351,6 +351,22 @@ MidiTimeAxisView::use_midnam_info ()
|
|||||||
controller_menu = 0;
|
controller_menu = 0;
|
||||||
|
|
||||||
setup_midnam_patches ();
|
setup_midnam_patches ();
|
||||||
|
|
||||||
|
/* update names on any automation lane with MIDNAM names */
|
||||||
|
for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
|
||||||
|
switch (i->first.type()) {
|
||||||
|
case MidiCCAutomation:
|
||||||
|
case MidiPgmChangeAutomation:
|
||||||
|
case MidiPitchBenderAutomation:
|
||||||
|
case MidiChannelPressureAutomation:
|
||||||
|
case MidiNotePressureAutomation:
|
||||||
|
case MidiSystemExclusiveAutomation:
|
||||||
|
i->second->update_name_from_param ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1316,6 +1332,9 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
|
|||||||
*this,
|
*this,
|
||||||
true,
|
true,
|
||||||
parent_canvas,
|
parent_canvas,
|
||||||
|
/* this calls MidiTrack::describe_parameter()
|
||||||
|
* -> instrument_info().get_controller_name()
|
||||||
|
*/
|
||||||
_route->describe_parameter(param)));
|
_route->describe_parameter(param)));
|
||||||
|
|
||||||
if (_view) {
|
if (_view) {
|
||||||
|
Loading…
Reference in New Issue
Block a user