Fix automation dropdown menu-item active state

Extra XML/GUI has not been in use since ages.
Automation Lane visibility is saved as GUIObjectState.

This properly marks DropDown Menu items as active when a
Plugin Automation Lane is displayed
This commit is contained in:
Robin Gareus 2019-12-12 03:01:31 +01:00
parent ff7fe6d4d6
commit a92dddda25
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 6 additions and 38 deletions

View file

@ -1009,35 +1009,6 @@ AutomationTimeAxisView::set_state (const XMLNode&, int /*version*/)
return 0;
}
void
AutomationTimeAxisView::what_has_visible_automation (const boost::shared_ptr<Automatable>& automatable, set<Evoral::Parameter>& visible)
{
/* this keeps "knowledge" of how we store visibility information
in XML private to this class.
*/
assert (automatable);
Automatable::Controls& controls (automatable->controls());
for (Automatable::Controls::iterator i = controls.begin(); i != controls.end(); ++i) {
boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl> (i->second);
if (ac && ac->alist()) {
const XMLNode* gui_node = ac->extra_xml ("GUI");
if (gui_node) {
bool shown;
if (gui_node->get_property ("shown", shown) && shown) {
visible.insert (i->first);
}
}
}
}
}
/** @return true if this view has any automation data to display */
bool