GUI: new pattern cursor logic, part 5
fix more bugs
This commit is contained in:
parent
608dc375ea
commit
75dca2f114
|
@ -247,7 +247,9 @@ void FurnaceGUI::finishSelection() {
|
||||||
|
|
||||||
// change order if necessary
|
// change order if necessary
|
||||||
if (curOrder!=cursor.order) {
|
if (curOrder!=cursor.order) {
|
||||||
curOrder=cursor.order;
|
if (!e->isPlaying() || !followPattern) {
|
||||||
|
setOrder(cursor.order);
|
||||||
|
}
|
||||||
updateScroll(cursor.y);
|
updateScroll(cursor.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -539,10 +539,10 @@ void FurnaceGUI::drawPattern() {
|
||||||
// wrap around and go to previous/next pattern if we're about to go beyond the view
|
// wrap around and go to previous/next pattern if we're about to go beyond the view
|
||||||
if (newScroll<0.0f && curOrder>0) {
|
if (newScroll<0.0f && curOrder>0) {
|
||||||
ImGui::SetScrollY(ImGui::GetScrollMaxY()+newScroll);
|
ImGui::SetScrollY(ImGui::GetScrollMaxY()+newScroll);
|
||||||
curOrder--;
|
if (!e->isPlaying() || !followPattern) setOrder(curOrder-1);
|
||||||
} else if (newScroll>ImGui::GetScrollMaxY() && curOrder<(e->curSubSong->ordersLen-1)) {
|
} else if (newScroll>ImGui::GetScrollMaxY() && curOrder<(e->curSubSong->ordersLen-1)) {
|
||||||
ImGui::SetScrollY(newScroll-ImGui::GetScrollMaxY());
|
ImGui::SetScrollY(newScroll-ImGui::GetScrollMaxY());
|
||||||
curOrder++;
|
if (!e->isPlaying() || !followPattern) setOrder(curOrder+1);
|
||||||
} else {
|
} else {
|
||||||
ImGui::SetScrollY(newScroll);
|
ImGui::SetScrollY(newScroll);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue