mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-25 22:57:37 +01:00
basic_ui: use session-provided bang/unbang functions
This commit is contained in:
parent
29dc388bbc
commit
6c292a83da
2 changed files with 7 additions and 35 deletions
|
|
@ -836,43 +836,15 @@ BasicUI::find_trigger (int x, int y)
|
|||
}
|
||||
|
||||
void
|
||||
BasicUI::bang (int x, int y)
|
||||
BasicUI::bang_trigger_at (int x, int y)
|
||||
{
|
||||
boost::shared_ptr<Route> r = session->get_remote_nth_route (x);
|
||||
if (!r) {
|
||||
return;
|
||||
}
|
||||
boost::shared_ptr<TriggerBox> tb = r->triggerbox();
|
||||
|
||||
if (!tb || !tb->active()) {
|
||||
return;
|
||||
}
|
||||
|
||||
TriggerPtr tp (tb->trigger (y));
|
||||
|
||||
if (!tp) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (tp) {
|
||||
tp->bang ();
|
||||
}
|
||||
session->bang_trigger_at (x, y);
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::unbang (int x)
|
||||
BasicUI::unbang_trigger_at (int x, int y)
|
||||
{
|
||||
boost::shared_ptr<Route> r = session->get_remote_nth_route (x);
|
||||
if (!r) {
|
||||
return;
|
||||
}
|
||||
boost::shared_ptr<TriggerBox> tb = r->triggerbox();
|
||||
|
||||
if (!tb || !tb->active()) {
|
||||
return;
|
||||
}
|
||||
|
||||
tb->stop_all_quantized ();
|
||||
session->unbang_trigger_at (x, y);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue