13
0

triggerbox: steps toward sane trigger stopping API and design (GUI edition)

This commit is contained in:
Paul Davis 2021-12-22 17:27:19 -07:00
parent ff89d998b2
commit 43203a407b
2 changed files with 18 additions and 3 deletions

View File

@ -35,6 +35,7 @@
#include "ardour_ui.h"
#include "gui_thread.h"
#include "keyboard.h"
#include "public_editor.h"
#include "region_view.h"
#include "selection.h"
@ -302,7 +303,14 @@ TriggerMaster::event_handler (GdkEvent* ev)
switch (ev->type) {
case GDK_BUTTON_PRESS:
if (ev->button.button == 1) {
_triggerbox->request_stop_all ();
if (Keyboard::modifier_state_equals (ev->button.state, Keyboard::PrimaryModifier)) {
_triggerbox->stop_all_immediately ();
} else {
_triggerbox->stop_all_quantized ();
}
return true;
}
break;
@ -615,7 +623,14 @@ CueMaster::event_handler (GdkEvent* ev)
switch (ev->type) {
case GDK_BUTTON_PRESS:
if (ev->button.button == 1) {
_session->stop_all_triggers ();
/* 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);
} else {
_session->stop_all_triggers (false);
}
return true;
}
break;

View File

@ -652,7 +652,7 @@ TriggerBoxUI::play_button_event (GdkEvent* ev, uint64_t n)
switch (ev->type) {
case GDK_BUTTON_PRESS:
if (ev->button.button == 1) {
_triggerbox.request_stop_all ();
_triggerbox.stop_all_immediately ();
return true;
}
break;