Use a callback instead of subtractive char math
This commit is contained in:
parent
7a8775382f
commit
cf5dcd12ee
@ -4105,6 +4105,11 @@ Editor::freeze_route ()
|
||||
current_interthread_info = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
set_slot (uint32_t* t, uint32_t v) {
|
||||
*t = v;
|
||||
}
|
||||
|
||||
void
|
||||
Editor::bounce_range_selection (BounceTarget target, bool enable_processing)
|
||||
{
|
||||
@ -4186,7 +4191,8 @@ Editor::bounce_range_selection (BounceTarget target, bool enable_processing)
|
||||
tslot = manage (new ArdourDropdown ());
|
||||
|
||||
for (int c = 0; c < TriggerBox::default_triggers_per_box; ++c) {
|
||||
tslot->append_text_item (string_compose ("%1", (char)('A' + c))); // XXX not translatable
|
||||
// XXX ('A' + x) is not translatable, TODO abstract using nth_letter()
|
||||
tslot->AddMenuElem (Menu_Helpers::MenuElem (string_compose ("%1", (char)('A' + c)), sigc::bind (sigc::ptr_fun (set_slot), &trigger_slot, c)));
|
||||
}
|
||||
tslot->set_active ("A");
|
||||
|
||||
@ -4209,9 +4215,6 @@ Editor::bounce_range_selection (BounceTarget target, bool enable_processing)
|
||||
}
|
||||
|
||||
dialog.get_result (bounce_name);
|
||||
if (tslot) {
|
||||
trigger_slot = tslot->get_text ()[0] - 'A'; // XXX
|
||||
}
|
||||
}
|
||||
|
||||
timepos_t start = selection->time[clicked_selection].start();
|
||||
|
Loading…
Reference in New Issue
Block a user