13
0

Prevent adding routes in read-only sessions

"AddTrackBus" is a rec_sensitive and write_sensitive action.

However the mixer bypasses this and unconditionally calls
ARDOUR_UI::instance()->add_route () in various cases
(right-click on blank space or scroller, left-click on "Add" buttons
in the VCA pane, route pane, etc).

Since those are direct events, not related actions, they need
to be explicitly ignored.

Ideally the "+" buttons would be made insensitive...
This commit is contained in:
Robin Gareus 2020-03-17 22:30:11 +01:00
parent 45026100aa
commit 5f88cbfd39
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -2614,12 +2614,12 @@ ARDOUR_UI::start_duplicate_routes ()
void
ARDOUR_UI::add_route ()
{
if (!add_route_dialog.get (false)) {
add_route_dialog->signal_response().connect (sigc::mem_fun (*this, &ARDOUR_UI::add_route_dialog_response));
if (!_session || !_session->writable() || _session->actively_recording()) {
return;
}
if (!_session) {
return;
if (!add_route_dialog.get (false)) {
add_route_dialog->signal_response().connect (sigc::mem_fun (*this, &ARDOUR_UI::add_route_dialog_response));
}
if (add_route_dialog->is_visible()) {