Properly propagate TAV TimeSelection
This commit is contained in:
parent
8400ebd175
commit
3d50563620
@ -889,6 +889,19 @@ AutomationTimeAxisView::add_line (boost::shared_ptr<AutomationLine> line)
|
|||||||
line->add_visibility (AutomationLine::Line);
|
line->add_visibility (AutomationLine::Line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
AutomationTimeAxisView::propagate_time_selection () const
|
||||||
|
{
|
||||||
|
/* MIDI automation is part of the MIDI region. It is always
|
||||||
|
* implicily selected with the parent, regardless of TAV selection
|
||||||
|
*/
|
||||||
|
if (_parameter.type() >= MidiCCAutomation &&
|
||||||
|
_parameter.type() <= MidiChannelPressureAutomation) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AutomationTimeAxisView::entered()
|
AutomationTimeAxisView::entered()
|
||||||
{
|
{
|
||||||
|
@ -189,6 +189,8 @@ protected:
|
|||||||
bool ignore_state_request;
|
bool ignore_state_request;
|
||||||
bool ignore_mode_request;
|
bool ignore_mode_request;
|
||||||
|
|
||||||
|
bool propagate_time_selection () const;
|
||||||
|
|
||||||
void automation_state_changed ();
|
void automation_state_changed ();
|
||||||
|
|
||||||
void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
|
void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
|
||||||
|
@ -1324,6 +1324,10 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_automation_child (param, track, show);
|
add_automation_child (param, track, show);
|
||||||
|
if (selected ()) {
|
||||||
|
reshow_selection (_editor.get_selection().time);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PanWidthAutomation:
|
case PanWidthAutomation:
|
||||||
|
@ -822,6 +822,9 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
|||||||
|
|
||||||
|
|
||||||
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
|
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
|
||||||
|
if (!(*i)->selected () && !(*i)->propagate_time_selection ()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
(*i)->show_selection (ts);
|
(*i)->show_selection (ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -879,6 +882,9 @@ TimeAxisView::reshow_selection (TimeSelection& ts)
|
|||||||
show_selection (ts);
|
show_selection (ts);
|
||||||
|
|
||||||
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
|
for (Children::iterator i = children.begin(); i != children.end(); ++i) {
|
||||||
|
if (!(*i)->selected () && !(*i)->propagate_time_selection ()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
(*i)->show_selection (ts);
|
(*i)->show_selection (ts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -289,6 +289,7 @@ class TimeAxisView : public virtual AxisView
|
|||||||
|
|
||||||
Children children;
|
Children children;
|
||||||
bool is_child (TimeAxisView*);
|
bool is_child (TimeAxisView*);
|
||||||
|
virtual bool propagate_time_selection () const { return false; }
|
||||||
|
|
||||||
virtual void remove_child (boost::shared_ptr<TimeAxisView>);
|
virtual void remove_child (boost::shared_ptr<TimeAxisView>);
|
||||||
void add_child (boost::shared_ptr<TimeAxisView>);
|
void add_child (boost::shared_ptr<TimeAxisView>);
|
||||||
|
Loading…
Reference in New Issue
Block a user