Add action to set curIns based on current channel instrument at cursor (#2090)

* push test

* remove test file

* add GUI_ACTION_PAT_ABSORB_INSTRUMENT action (set current instrument to channel's current instrument column)

---------

Co-authored-by: Adam Lederer <adam@adamlederer.com>
This commit is contained in:
alederer 2024-08-17 13:50:52 -07:00 committed by GitHub
parent 3cde827c17
commit fca3ce02a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 0 deletions

View file

@ -676,6 +676,17 @@ void FurnaceGUI::doAction(int what) {
latchTarget=0;
latchNibble=false;
break;
case GUI_ACTION_PAT_ABSORB_INSTRUMENT: {
DivPattern* pat=e->curPat[cursor.xCoarse].getPattern(e->curOrders->ord[cursor.xCoarse][curOrder],false);
if (!pat) break;
for (int i=cursor.y; i>=0; i--) {
if (pat->data[i][2] >= 0) {
curIns=pat->data[i][2];
break;
}
}
break;
}
case GUI_ACTION_INS_LIST_ADD:
if (settings.insTypeMenu) {