Recovered "Follow pattern state" on play due to Find/Replace (#2468)

This commit is contained in:
recme 2025-05-21 20:05:31 -04:00 committed by GitHub
parent 26a66ad4c4
commit dcb383b86d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 2 deletions

View file

@ -568,7 +568,10 @@ void FurnaceGUI::drawFindReplace() {
makeCursorUndo();
e->changeSongP(i.subsong);
if (e->isPlaying()) {
followPattern=false;
if (followPattern) {
wasFollowing=followPattern;
followPattern=false;
}
} else {
e->setOrder(i.order);
}

View file

@ -1186,6 +1186,10 @@ void FurnaceGUI::play(int row) {
memset(chanOscBright,0,DIV_MAX_CHANS*sizeof(float));
e->walkSong(loopOrder,loopRow,loopEnd);
memset(lastIns,-1,sizeof(int)*DIV_MAX_CHANS);
if (wasFollowing) {
followPattern=true;
wasFollowing=false;
}
if (followPattern) makeCursorUndo();
if (!followPattern) e->setOrder(curOrder);
if (row>=0) {
@ -1225,6 +1229,10 @@ void FurnaceGUI::stop() {
}
updateScroll(cursor.y);
}
if (wasFollowing) {
followPattern = true;
wasFollowing = false;
}
}
void FurnaceGUI::previewNote(int refChan, int note, bool autoNote) {

View file

@ -2365,7 +2365,7 @@ class FurnaceGUI {
float clockMetroTick[16];
SelectionPoint selStart, selEnd, cursor, cursorDrag, dragStart, dragEnd;
bool selecting, selectingFull, dragging, curNibble, orderNibble, followOrders, followPattern, changeAllOrders, mobileUI;
bool selecting, selectingFull, dragging, curNibble, orderNibble, followOrders, followPattern, wasFollowing, changeAllOrders, mobileUI;
bool collapseWindow, demandScrollX, fancyPattern, firstFrame, tempoView, waveHex, waveSigned, waveGenVisible, lockLayout, editOptsVisible, latchNibble, nonLatchNibble;
bool keepLoopAlive, keepGrooveAlive, orderScrollLocked, orderScrollTolerance, dragMobileMenu, dragMobileEditButton, wantGrooveListFocus;
bool mobilePatSel;