13
0

trigger_ui: trigger-master button should follow conventions of other Stop buttons

Normally the Stop occurs quantized (on bar ending). Primary-modifier means 'stop now'
This commit is contained in:
Ben Loftis 2021-12-27 16:48:13 -06:00
parent a43e3d88e5
commit f5c2697f4f
2 changed files with 8 additions and 6 deletions

View File

@ -612,13 +612,10 @@ CueMaster::event_handler (GdkEvent* ev)
switch (ev->type) {
case GDK_BUTTON_PRESS:
if (ev->button.button == 1) {
/* stop all running triggers, but let them run
to their natural end
*/
if (Keyboard::modifier_state_equals (ev->button.state, Keyboard::PrimaryModifier)) {
_session->stop_all_triggers (true);
_session->stop_all_triggers (true); //stop 'now'
} else {
_session->stop_all_triggers (false);
_session->stop_all_triggers (false); //stop quantized (bar end)
}
return true;
}

View File

@ -39,6 +39,7 @@
#include "ardour_ui.h"
#include "gui_thread.h"
#include "keyboard.h"
#include "public_editor.h"
#include "region_view.h"
#include "selection.h"
@ -644,7 +645,11 @@ TriggerBoxUI::play_button_event (GdkEvent* ev, uint64_t n)
switch (ev->type) {
case GDK_BUTTON_PRESS:
if (ev->button.button == 1) {
_triggerbox.stop_all_immediately ();
if (Keyboard::modifier_state_equals (ev->button.state, Keyboard::PrimaryModifier)) {
_triggerbox.stop_all_immediately ();
} else {
_triggerbox.stop_all_quantized ();
}
return true;
}
break;