Fixed #246: Dropdown controls regarding Floppy and CD drive were changed always to the last value entered on an update
This commit is contained in:
parent
673a0dc5f3
commit
667cd86543
3 changed files with 4 additions and 4 deletions
|
@ -51,7 +51,7 @@ static bool bIgnoreListChange = false;
|
||||||
class DriveTypeListModel : public gcn::ListModel
|
class DriveTypeListModel : public gcn::ListModel
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::vector<std::string> types;
|
std::vector<std::string> types{};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DriveTypeListModel()
|
DriveTypeListModel()
|
||||||
|
@ -555,7 +555,7 @@ static void AdjustDropDownControls()
|
||||||
{
|
{
|
||||||
for (unsigned int j = 0; j < lstMRUDiskList.size(); ++j)
|
for (unsigned int j = 0; j < lstMRUDiskList.size(); ++j)
|
||||||
{
|
{
|
||||||
if (lstMRUDiskList[j].c_str() != changed_prefs.floppyslots[i].df)
|
if (strcmp(lstMRUDiskList[j].c_str(), changed_prefs.floppyslots[i].df) == 0)
|
||||||
{
|
{
|
||||||
cboDFxFile[i]->setSelected(j);
|
cboDFxFile[i]->setSelected(j);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -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].c_str() != changed_prefs.cdslots[0].name)
|
if (strcmp(lstMRUCDList[i].c_str(), changed_prefs.cdslots[0].name) == 0)
|
||||||
{
|
{
|
||||||
cboCDFile->setSelected(i);
|
cboCDFile->setSelected(i);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -838,7 +838,7 @@ static void AdjustDropDownControls(void)
|
||||||
{
|
{
|
||||||
for (unsigned int j = 0; j < lstMRUDiskList.size(); ++j)
|
for (unsigned int j = 0; j < lstMRUDiskList.size(); ++j)
|
||||||
{
|
{
|
||||||
if (lstMRUDiskList[j].c_str() != changed_prefs.floppyslots[i].df)
|
if (strcmp(lstMRUDiskList[j].c_str(), changed_prefs.floppyslots[i].df) == 0)
|
||||||
{
|
{
|
||||||
cboDFxFile[i]->setSelected(j);
|
cboDFxFile[i]->setSelected(j);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue