call walkSong on edit

issue #1541
This commit is contained in:
tildearrow 2023-12-10 18:32:40 -05:00
parent 342a2174d5
commit 0274698426
2 changed files with 19 additions and 4 deletions

View file

@ -4,11 +4,9 @@
# THE REAL TO-DO LIST
- Song is silent after playing an order after loop point
- Select loaded instrument on open - rewrite because I want a setting...
- finish auto-clone
once you have done all of this (maybe not the first one) and merged the two or so pending pull requests, release 0.6.1
once you have done all of this (maybe not the first one), release 0.6.1
Furnace is like alcohol...

View file

@ -88,6 +88,7 @@ void FurnaceGUI::prepareUndo(ActionType action) {
void FurnaceGUI::makeUndo(ActionType action) {
bool doPush=false;
bool shallWalk=false;
UndoStep s;
s.type=action;
s.cursor=cursor;
@ -136,6 +137,18 @@ void FurnaceGUI::makeUndo(ActionType action) {
for (int k=0; k<DIV_MAX_COLS; k++) {
if (p->data[j][k]!=oldPat[i]->data[j][k]) {
s.pat.push_back(UndoPatternData(subSong,i,e->curOrders->ord[i][curOrder],j,k,oldPat[i]->data[j][k],p->data[j][k]));
if (k>=4) {
if (oldPat[i]->data[j][k&(~1)]==0x0b ||
p->data[j][k&(~1)]==0x0b ||
oldPat[i]->data[j][k&(~1)]==0x0d ||
p->data[j][k&(~1)]==0x0d ||
oldPat[i]->data[j][k&(~1)]==0xff ||
p->data[j][k&(~1)]==0xff) {
shallWalk=true;
}
}
}
}
}
@ -156,6 +169,9 @@ void FurnaceGUI::makeUndo(ActionType action) {
redoHist.clear();
if (undoHist.size()>settings.maxUndoSteps) undoHist.pop_front();
}
if (shallWalk) {
e->walkSong(loopOrder,loopRow,loopEnd);
}
}
void FurnaceGUI::doSelectAll() {
@ -1770,6 +1786,7 @@ void FurnaceGUI::doUndo() {
setOrder(us.order);
}
}
e->walkSong(loopOrder,loopRow,loopEnd);
break;
}
@ -1845,7 +1862,7 @@ void FurnaceGUI::doRedo() {
setOrder(us.order);
}
}
e->walkSong(loopOrder,loopRow,loopEnd);
break;
}