From 20eaf07e5a6eae67a11023f336b317c8f5d19b02 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 22 Oct 2025 15:08:22 -0600 Subject: [PATCH] better solution for send prop change on trigger stop this amends 8a262e26fb7f3 and avoids sending the change on every transport stop etc --- libs/ardour/triggerbox.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 5f7af86ab5..4037f19a3d 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -837,7 +837,6 @@ Trigger::shutdown_from_fwd () { if (_state == Stopped) { DEBUG_TRACE (DEBUG::Triggers, string_compose ("%1/%2 [%3] already stopped\n", _box.order(), index(), name())); - send_property_change (ARDOUR::Properties::running); return; } _state = Stopped; @@ -1256,6 +1255,8 @@ Trigger::when_stopped_during_run (BufferSet& bufs, pframes_t dest_offset) } else { + State old_state = _state; + if ((launch_style() != Repeat) && (launch_style() != Gate) && (_loop_cnt == _follow_count)) { /* have played the specified number of times, we're done */ @@ -1287,8 +1288,9 @@ Trigger::when_stopped_during_run (BufferSet& bufs, pframes_t dest_offset) */ _state = WaitingToStart; retrigger (); - send_property_change (ARDOUR::Properties::running); } + + send_property_change (ARDOUR::Properties::running); } } }