fix #2182
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:
parent
f80dd764f3
commit
901bb110cc
|
@ -1024,7 +1024,7 @@ void FurnaceGUI::drawEditControls() {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button(ICON_FA_PLAY_CIRCLE "##PlayAgain")) {
|
if (ImGui::Button(ICON_FA_PLAY_CIRCLE "##PlayAgain")) {
|
||||||
e->setRepeatPattern(false);
|
e->setRepeatPattern(false);
|
||||||
play();
|
play(0);
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip(_("Play from the beginning of this pattern"));
|
ImGui::SetTooltip(_("Play from the beginning of this pattern"));
|
||||||
|
@ -1032,7 +1032,7 @@ void FurnaceGUI::drawEditControls() {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button(ICON_FA_STEP_FORWARD "##PlayRepeat")) {
|
if (ImGui::Button(ICON_FA_STEP_FORWARD "##PlayRepeat")) {
|
||||||
e->setRepeatPattern(true);
|
e->setRepeatPattern(true);
|
||||||
play();
|
play(0);
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip(_("Repeat from the beginning of this pattern"));
|
ImGui::SetTooltip(_("Repeat from the beginning of this pattern"));
|
||||||
|
|
|
@ -1229,7 +1229,7 @@ void FurnaceGUI::play(int row) {
|
||||||
memset(lastIns,-1,sizeof(int)*DIV_MAX_CHANS);
|
memset(lastIns,-1,sizeof(int)*DIV_MAX_CHANS);
|
||||||
if (followPattern) makeCursorUndo();
|
if (followPattern) makeCursorUndo();
|
||||||
if (!followPattern) e->setOrder(curOrder);
|
if (!followPattern) e->setOrder(curOrder);
|
||||||
if (row>0) {
|
if (row>=0) {
|
||||||
if (!e->playToRow(row)) {
|
if (!e->playToRow(row)) {
|
||||||
showError(_("the song is over!"));
|
showError(_("the song is over!"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2997,7 +2997,7 @@ class FurnaceGUI {
|
||||||
void doUndoInstrument();
|
void doUndoInstrument();
|
||||||
void doRedoInstrument();
|
void doRedoInstrument();
|
||||||
|
|
||||||
void play(int row=0);
|
void play(int row=-1);
|
||||||
void setOrder(unsigned char order, bool forced=false);
|
void setOrder(unsigned char order, bool forced=false);
|
||||||
void stop();
|
void stop();
|
||||||
void endIntroTune();
|
void endIntroTune();
|
||||||
|
|
Loading…
Reference in a new issue