GUI: fix cursor inconsistency after stop

issue #1424
This commit is contained in:
tildearrow 2023-08-29 18:54:08 -05:00
parent d38ff59cb8
commit 015899a43f
1 changed files with 11 additions and 0 deletions

View File

@ -1103,10 +1103,21 @@ void FurnaceGUI::setOrder(unsigned char order, bool forced) {
}
void FurnaceGUI::stop() {
bool wasPlaying=e->isPlaying();
e->walkSong(loopOrder,loopRow,loopEnd);
e->stop();
curNibble=false;
orderNibble=false;
if (followPattern && wasPlaying) {
nextScroll=-1.0f;
nextAddScroll=0.0f;
cursor.y=e->getRow();
if (selStart.xCoarse==selEnd.xCoarse && selStart.xFine==selEnd.xFine && selStart.y==selEnd.y && !selecting) {
selStart=cursor;
selEnd=cursor;
}
updateScroll(cursor.y);
}
}
void FurnaceGUI::previewNote(int refChan, int note, bool autoNote) {