Tweak automation-lane auto-display

Hide lanes when touching a control when the editor is not
visible or if the option is disabled.
This commit is contained in:
Robin Gareus 2021-02-09 17:36:38 +01:00
parent 15f12bd3a9
commit 4f605926c5
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 8 additions and 2 deletions

View File

@ -4061,6 +4061,9 @@ Editor::set_show_touched_automation (bool yn)
return;
}
_show_touched_automation = yn;
if (!yn) {
RouteTimeAxisView::signal_ctrl_touched ();
}
instant_save ();
}

View File

@ -1603,6 +1603,9 @@ RouteTimeAxisView::show_touched_automation (boost::weak_ptr<PBD::Controllable> w
}
if (!_editor.show_touched_automation ()) {
if (ctrl_autohide_connection.connected ()) {
signal_ctrl_touched ();
}
return;
}

View File

@ -141,6 +141,8 @@ public:
void meter_changed ();
void effective_gain_display () { gm.effective_gain_display(); }
static sigc::signal<void> signal_ctrl_touched;
std::string state_id() const;
void show_all_automation (bool apply_to_selection = false);
@ -311,8 +313,6 @@ private:
void reread_midnam ();
PBD::ScopedConnectionList midnam_connection;
static sigc::signal<void> signal_ctrl_touched;
PBD::ScopedConnection ctrl_touched_connection;
sigc::connection ctrl_autohide_connection;
};