GUI: fix duplicate entry in wave size selector

This commit is contained in:
tildearrow 2024-04-17 17:35:41 -05:00
parent 3b12564943
commit 4281b899cf

View file

@ -772,9 +772,19 @@ void FurnaceGUI::doAction(int what) {
case GUI_ACTION_WAVE_LIST_ADD: {
std::vector<DivSystem> alreadyDone;
waveSizeList.clear();
for (int i=0; i<e->song.systemLen; i++) {
bool skip=false;
for (DivSystem j: alreadyDone) {
if (e->song.system[i]==j) {
skip=true;
break;
}
}
if (skip) continue;
const DivSysDef* sysDef=e->getSystemDef(e->song.system[i]);
alreadyDone.push_back(e->song.system[i]);
if (sysDef==NULL) continue;
if (sysDef->waveHeight==0) continue;