mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
fix another #warning from the pianorule refactoring
There is one single place in AutomationLine code where we need to callback to its AutomationTimeAxisView, if it is part of one, regarding automation state. This permits that to happen
This commit is contained in:
parent
6af9d08f69
commit
dd3683bc06
5 changed files with 36 additions and 18 deletions
|
|
@ -112,6 +112,7 @@ AutomationLine::AutomationLine (const string& name,
|
||||||
, _desc (desc)
|
, _desc (desc)
|
||||||
, _control_points_inherit_color (true)
|
, _control_points_inherit_color (true)
|
||||||
, _sensitive (true)
|
, _sensitive (true)
|
||||||
|
, atv (nullptr)
|
||||||
{
|
{
|
||||||
group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple(0, 1.5));
|
group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple(0, 1.5));
|
||||||
CANVAS_DEBUG_NAME (group, "automation line group");
|
CANVAS_DEBUG_NAME (group, "automation line group");
|
||||||
|
|
@ -1628,8 +1629,9 @@ AutomationLine::add (std::shared_ptr<AutomationControl> control, GdkEvent* event
|
||||||
if (alist->editor_add (when, y, with_guard_points)) {
|
if (alist->editor_add (when, y, with_guard_points)) {
|
||||||
|
|
||||||
if (control->automation_state () == ARDOUR::Off) {
|
if (control->automation_state () == ARDOUR::Off) {
|
||||||
#warning paul make this work again .. call back to ATV or similar
|
if (atv) {
|
||||||
// set_automation_state (ARDOUR::Play);
|
atv->set_automation_state (ARDOUR::Play);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UIConfiguration::instance().get_automation_edit_cancels_auto_hide () && control == session->recently_touched_controllable ()) {
|
if (UIConfiguration::instance().get_automation_edit_cancels_auto_hide () && control == session->recently_touched_controllable ()) {
|
||||||
|
|
@ -1647,3 +1649,9 @@ AutomationLine::add (std::shared_ptr<AutomationControl> control, GdkEvent* event
|
||||||
session->set_dirty ();
|
session->set_dirty ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AutomationLine::set_atv (AutomationTimeAxisView& a)
|
||||||
|
{
|
||||||
|
atv = &a;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,9 @@ public:
|
||||||
|
|
||||||
virtual ~AutomationLine ();
|
virtual ~AutomationLine ();
|
||||||
|
|
||||||
|
|
||||||
|
void set_atv (AutomationTimeAxisView&);
|
||||||
|
|
||||||
virtual Temporal::timepos_t get_origin () const;
|
virtual Temporal::timepos_t get_origin () const;
|
||||||
|
|
||||||
ArdourCanvas::Rectangle* drag_base() const { return _drag_base; }
|
ArdourCanvas::Rectangle* drag_base() const { return _drag_base; }
|
||||||
|
|
@ -271,6 +274,7 @@ private:
|
||||||
const ARDOUR::ParameterDescriptor _desc;
|
const ARDOUR::ParameterDescriptor _desc;
|
||||||
bool _control_points_inherit_color;
|
bool _control_points_inherit_color;
|
||||||
bool _sensitive;
|
bool _sensitive;
|
||||||
|
AutomationTimeAxisView* atv;
|
||||||
|
|
||||||
friend class AudioRegionGainLine;
|
friend class AudioRegionGainLine;
|
||||||
friend class RegionFxLine;
|
friend class RegionFxLine;
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,12 @@ EditorAutomationLine::EditorAutomationLine (const string&
|
||||||
, trackview (tv)
|
, trackview (tv)
|
||||||
{
|
{
|
||||||
line->set_data ("trackview", &trackview);
|
line->set_data ("trackview", &trackview);
|
||||||
|
|
||||||
|
AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (&tv);
|
||||||
|
|
||||||
|
if (atv) {
|
||||||
|
set_atv (*atv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorAutomationLine::~EditorAutomationLine ()
|
EditorAutomationLine::~EditorAutomationLine ()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue