13
0

gtk2_ardour: set region marks into currently recording regions

Region actions are generally set insensitive whilst recording, so
special-case the "add-region-cue-marker" action by explicitly enabling it
when starting to roll in record. Additionally, the action becomes disabled
again after it's been executed, so re-enable it after queuing the cue when
recording.
This commit is contained in:
Colin Fletcher 2022-04-18 16:56:36 +01:00 committed by Paul Davis
parent cef86efe1b
commit c9446aa1e1
2 changed files with 8 additions and 0 deletions

View File

@ -1812,6 +1812,7 @@ ARDOUR_UI::transport_record (bool roll)
}
_session->maybe_enable_record ();
if (roll) {
ActionManager::get_action (X_("Region"), X_("add-region-cue-marker"))->set_sensitive(true);
transport_roll ();
}
break;

View File

@ -9042,6 +9042,13 @@ Editor::add_region_marker ()
return;
}
if (_session->actively_recording ()) {
CueMarker mark (str, position);
std::cerr << "queuing cue " << str << " at " << position << "\n";
_session->pending_source_markers.insert (mark);
ActionManager::get_action (X_("Region"), X_("add-region-cue-marker"))->set_sensitive(true);
return;
}
bool in_command = false;