mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 09:06:33 +01:00
push2: use correct selection API
This commit is contained in:
parent
053207003b
commit
bc1876a84b
1 changed files with 8 additions and 10 deletions
|
|
@ -356,7 +356,7 @@ Push2::button_lower (uint32_t n)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modifier_state & ModSelect) {
|
if (modifier_state & ModSelect) {
|
||||||
stripable[n]->presentation_info().set_selected (!stripable[n]->presentation_info().selected());
|
SetStripableSelection (stripable[n]);
|
||||||
} else {
|
} else {
|
||||||
boost::shared_ptr<MuteControl> mc = stripable[n]->mute_control ();
|
boost::shared_ptr<MuteControl> mc = stripable[n]->mute_control ();
|
||||||
|
|
||||||
|
|
@ -495,7 +495,7 @@ Push2::button_select_release ()
|
||||||
/* no visible track selected, select first (if any) */
|
/* no visible track selected, select first (if any) */
|
||||||
|
|
||||||
if (stripable[0]) {
|
if (stripable[0]) {
|
||||||
stripable[0]->presentation_info().set_selected (true);
|
SetStripableSelection (stripable[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -509,10 +509,10 @@ Push2::button_select_release ()
|
||||||
switch banks by one, and select leftmost
|
switch banks by one, and select leftmost
|
||||||
*/
|
*/
|
||||||
if (bank_start != 0) {
|
if (bank_start != 0) {
|
||||||
stripable[selected]->presentation_info().set_selected (false);
|
ClearStripableSelection ();
|
||||||
switch_bank (bank_start-1);
|
switch_bank (bank_start-1);
|
||||||
if (stripable[0]) {
|
if (stripable[0]) {
|
||||||
stripable[0]->presentation_info().set_selected (true);
|
SetStripableSelection (stripable[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -522,8 +522,7 @@ Push2::button_select_release ()
|
||||||
--n;
|
--n;
|
||||||
}
|
}
|
||||||
if (n >= 0) {
|
if (n >= 0) {
|
||||||
stripable[selected]->presentation_info().set_selected (false);
|
SetStripableSelection (stripable[n]);
|
||||||
stripable[n]->presentation_info().set_selected (true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -536,10 +535,10 @@ Push2::button_select_release ()
|
||||||
/* current selected is rightmost ... cancel selection,
|
/* current selected is rightmost ... cancel selection,
|
||||||
switch banks by one, and select righmost
|
switch banks by one, and select righmost
|
||||||
*/
|
*/
|
||||||
stripable[selected]->presentation_info().set_selected (false);
|
ToggleStripableSelection (stripable[selected]);
|
||||||
switch_bank (bank_start+1);
|
switch_bank (bank_start+1);
|
||||||
if (stripable[7]) {
|
if (stripable[7]) {
|
||||||
stripable[7]->presentation_info().set_selected (true);
|
SetStripableSelection (stripable[7]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* select next, if any */
|
/* select next, if any */
|
||||||
|
|
@ -549,8 +548,7 @@ Push2::button_select_release ()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n != 8) {
|
if (n != 8) {
|
||||||
stripable[selected]->presentation_info().set_selected (false);
|
SetStripableSelection (stripable[n]);
|
||||||
stripable[n]->presentation_info().set_selected (true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue