Fixed bug in GUI, where the CD dropdown would not keep the value if you selected one from the history

This commit is contained in:
Dimitris Panokostas 2018-02-05 22:21:31 +01:00
parent 7dc7645fd2
commit 794f38f079

View file

@ -324,7 +324,7 @@ public:
} }
else else
{ {
if (cdfileList.getElementAt(idx) == changed_prefs.cdslots[0].name) if (cdfileList.getElementAt(idx) != changed_prefs.cdslots[0].name)
{ {
strncpy(changed_prefs.cdslots[0].name, cdfileList.getElementAt(idx).c_str(), sizeof changed_prefs.cdslots[0].name); strncpy(changed_prefs.cdslots[0].name, cdfileList.getElementAt(idx).c_str(), sizeof changed_prefs.cdslots[0].name);
changed_prefs.cdslots[0].inuse = true; changed_prefs.cdslots[0].inuse = true;
@ -553,7 +553,7 @@ static void AdjustDropDownControls()
{ {
for (unsigned int i = 0; i < lstMRUCDList.size(); ++i) for (unsigned int i = 0; i < lstMRUCDList.size(); ++i)
{ {
if (lstMRUCDList[i] != changed_prefs.cdslots[0].name) if (lstMRUCDList[i].c_str() != changed_prefs.cdslots[0].name)
{ {
cboCDFile->setSelected(i); cboCDFile->setSelected(i);
break; break;