mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-28 15:33:01 +00:00
GUI: fix crash when deleting current subsong
This commit is contained in:
parent
e06e65bfa6
commit
b8a4fdb4c6
1 changed files with 15 additions and 2 deletions
|
@ -3492,10 +3492,23 @@ bool FurnaceGUI::loop() {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GUI_WARN_CLEAR:
|
case GUI_WARN_CLEAR:
|
||||||
if (ImGui::Button("Song (orders and patterns)")) {
|
if (ImGui::Button("All subsongs")) {
|
||||||
|
stop();
|
||||||
|
//e->lockEngine([this]() {
|
||||||
|
//e->curSubSong->clearData();
|
||||||
|
//});
|
||||||
|
e->setOrder(0);
|
||||||
|
curOrder=0;
|
||||||
|
oldOrder=0;
|
||||||
|
oldOrder1=0;
|
||||||
|
MARK_MODIFIED;
|
||||||
|
ImGui::CloseCurrentPopup();
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (ImGui::Button("Current subsong")) {
|
||||||
stop();
|
stop();
|
||||||
e->lockEngine([this]() {
|
e->lockEngine([this]() {
|
||||||
e->song.clearSongData();
|
e->curSubSong->clearData();
|
||||||
});
|
});
|
||||||
e->setOrder(0);
|
e->setOrder(0);
|
||||||
curOrder=0;
|
curOrder=0;
|
||||||
|
|
Loading…
Reference in a new issue