Changed behavior of FurnaceGUI::play - explicitly providing 0 will
always play from the beginning of the pattern. Default argument of -1
will result in default behavior (play from beginning unless currently
stepping).
This commit is contained in:
--global 2024-10-01 11:15:54 -06:00 committed by freq-mod
parent f80dd764f3
commit 901bb110cc
3 changed files with 4 additions and 4 deletions

View file

@ -1024,7 +1024,7 @@ void FurnaceGUI::drawEditControls() {
ImGui::SameLine();
if (ImGui::Button(ICON_FA_PLAY_CIRCLE "##PlayAgain")) {
e->setRepeatPattern(false);
play();
play(0);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_("Play from the beginning of this pattern"));
@ -1032,7 +1032,7 @@ void FurnaceGUI::drawEditControls() {
ImGui::SameLine();
if (ImGui::Button(ICON_FA_STEP_FORWARD "##PlayRepeat")) {
e->setRepeatPattern(true);
play();
play(0);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_("Repeat from the beginning of this pattern"));

View file

@ -1229,7 +1229,7 @@ void FurnaceGUI::play(int row) {
memset(lastIns,-1,sizeof(int)*DIV_MAX_CHANS);
if (followPattern) makeCursorUndo();
if (!followPattern) e->setOrder(curOrder);
if (row>0) {
if (row>=0) {
if (!e->playToRow(row)) {
showError(_("the song is over!"));
}

View file

@ -2997,7 +2997,7 @@ class FurnaceGUI {
void doUndoInstrument();
void doRedoInstrument();
void play(int row=0);
void play(int row=-1);
void setOrder(unsigned char order, bool forced=false);
void stop();
void endIntroTune();