Fix automation lane visibility and indices - #8162
This fixes an issue with using StripableTimeAxisView::_automation_tracks for PluginAutomation. The latter is indexed per-plugin in RouteTimeAxisView::processor_automation Evoral::Parameter(PluginAutomation) is only unique per plugin, and hence cannot be used in STAV.
This commit is contained in:
parent
ef94663d1c
commit
72af571f0c
@ -1740,6 +1740,8 @@ RouteTimeAxisView::color_handler ()
|
|||||||
void
|
void
|
||||||
RouteTimeAxisView::toggle_automation_track (const Evoral::Parameter& param)
|
RouteTimeAxisView::toggle_automation_track (const Evoral::Parameter& param)
|
||||||
{
|
{
|
||||||
|
assert (param.type() != PluginAutomation);
|
||||||
|
|
||||||
boost::shared_ptr<AutomationTimeAxisView> track = automation_child (param);
|
boost::shared_ptr<AutomationTimeAxisView> track = automation_child (param);
|
||||||
Gtk::CheckMenuItem* menu = automation_child_menu_item (param);
|
Gtk::CheckMenuItem* menu = automation_child_menu_item (param);
|
||||||
|
|
||||||
@ -2145,10 +2147,12 @@ RouteTimeAxisView::add_processor_to_subplugin_menu (boost::weak_ptr<Processor> p
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::shared_ptr<AutomationTimeAxisView> atav = automation_child (*i);
|
boost::shared_ptr<AutomationTimeAxisView> atav = pan->view;
|
||||||
bool visible;
|
bool visible;
|
||||||
if (atav && atav->get_gui_property ("visible", visible)) {
|
if (atav && atav->get_gui_property ("visible", visible)) {
|
||||||
mitem->set_active(true);
|
mitem->set_active(true);
|
||||||
|
} else {
|
||||||
|
mitem->set_active(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
mitem->signal_toggled().connect (sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::processor_menu_item_toggled), rai, pan));
|
mitem->signal_toggled().connect (sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::processor_menu_item_toggled), rai, pan));
|
||||||
|
@ -73,9 +73,14 @@ StripableTimeAxisView::add_automation_child (Evoral::Parameter param, boost::sha
|
|||||||
|
|
||||||
add_child (track);
|
add_child (track);
|
||||||
|
|
||||||
|
if (param.type() != PluginAutomation) {
|
||||||
|
/* PluginAutomation is handled by
|
||||||
|
* - RouteTimeAxisView::processor_automation_track_hidden
|
||||||
|
* - RouteTimeAxisView::processor_automation
|
||||||
|
*/
|
||||||
track->Hiding.connect (sigc::bind (sigc::mem_fun (*this, &StripableTimeAxisView::automation_track_hidden), param));
|
track->Hiding.connect (sigc::bind (sigc::mem_fun (*this, &StripableTimeAxisView::automation_track_hidden), param));
|
||||||
|
|
||||||
_automation_tracks[param] = track;
|
_automation_tracks[param] = track;
|
||||||
|
}
|
||||||
|
|
||||||
/* existing state overrides "show" argument */
|
/* existing state overrides "show" argument */
|
||||||
bool visible;
|
bool visible;
|
||||||
@ -155,6 +160,7 @@ StripableTimeAxisView::update_mute_track_visibility ()
|
|||||||
Gtk::CheckMenuItem*
|
Gtk::CheckMenuItem*
|
||||||
StripableTimeAxisView::automation_child_menu_item (Evoral::Parameter param)
|
StripableTimeAxisView::automation_child_menu_item (Evoral::Parameter param)
|
||||||
{
|
{
|
||||||
|
assert (param.type() != PluginAutomation);
|
||||||
ParameterMenuMap::iterator i = _main_automation_menu_map.find (param);
|
ParameterMenuMap::iterator i = _main_automation_menu_map.find (param);
|
||||||
if (i != _main_automation_menu_map.end()) {
|
if (i != _main_automation_menu_map.end()) {
|
||||||
return i->second;
|
return i->second;
|
||||||
@ -186,6 +192,7 @@ StripableTimeAxisView::automation_track_hidden (Evoral::Parameter param)
|
|||||||
boost::shared_ptr<AutomationTimeAxisView>
|
boost::shared_ptr<AutomationTimeAxisView>
|
||||||
StripableTimeAxisView::automation_child(Evoral::Parameter param)
|
StripableTimeAxisView::automation_child(Evoral::Parameter param)
|
||||||
{
|
{
|
||||||
|
assert (param.type() != PluginAutomation);
|
||||||
AutomationTracks::iterator i = _automation_tracks.find(param);
|
AutomationTracks::iterator i = _automation_tracks.find(param);
|
||||||
if (i != _automation_tracks.end()) {
|
if (i != _automation_tracks.end()) {
|
||||||
return i->second;
|
return i->second;
|
||||||
|
Loading…
Reference in New Issue
Block a user