Amend b3ee25f81, don't allow to remove-last-capture while recording

This commit is contained in:
Robin Gareus
2025-03-02 18:53:21 +01:00
parent 67716bc871
commit d04376bee4
2 changed files with 2 additions and 1 deletions

View File

@@ -1302,6 +1302,7 @@ Editor::set_session (Session *t)
_session->auto_loop_location_changed.connect (_session_connections, invalidator (*this), std::bind (&Editor::loop_location_changed, this, _1), gui_context ());
_session->RecordPassCompleted.connect (_session_connections, invalidator (*this), std::bind (&Editor::capture_sources_changed, this, false), gui_context ());
_session->ClearedLastCaptureSources.connect (_session_connections, invalidator (*this), std::bind (&Editor::capture_sources_changed, this, true), gui_context ());
_session->RecordStateChanged.connect (_session_connections, invalidator (*this), std::bind (&Editor::capture_sources_changed, this, false), gui_context ());
Location::flags_changed.connect (_session_connections, invalidator (*this), std::bind (&Editor::update_section_rects, this), gui_context ());
_session->history().Changed.connect (_session_connections, invalidator (*this), std::bind (&Editor::history_changed, this), gui_context());

View File

@@ -1018,7 +1018,7 @@ Editor::marker_click_behavior_chosen (Editing::MarkerClickBehavior m)
void
Editor::capture_sources_changed (bool cleared)
{
if (cleared || !_session) {
if (cleared || !_session || _session->actively_recording ()) {
ActionManager::get_action (X_("Editor"), X_("remove-last-capture"))->set_sensitive (false);
} else {
ActionManager::get_action (X_("Editor"), X_("remove-last-capture"))->set_sensitive (_session->have_last_capture_sources ());