GUI: fix adding orders

This commit is contained in:
tildearrow 2023-03-09 00:36:18 -05:00
parent 9fc3a8afed
commit c90152b425
2 changed files with 3 additions and 1 deletions

View file

@ -3625,7 +3625,8 @@ void DivEngine::addOrder(int pos, bool duplicate, bool where) {
}
curSubSong->ordersLen++;
saveLock.unlock();
if (pos<=curOrder) curOrder++;
curOrder=pos+1;
prevOrder=curOrder;
if (playing && !freelance) {
playSub(false);
}

View file

@ -1472,6 +1472,7 @@ void FurnaceGUI::doAction(int what) {
case GUI_ACTION_ORDERS_ADD:
prepareUndo(GUI_UNDO_CHANGE_ORDER);
e->addOrder(curOrder,false,false);
curOrder=e->getOrder();
makeUndo(GUI_UNDO_CHANGE_ORDER);
break;
case GUI_ACTION_ORDERS_DUPLICATE: