Ensure correct opencl device is populated when platform setting is changed

This fixes an issue where the options dialog displays the incorrect device when it is first opened, when using a device other than 0
This commit is contained in:
Simon Detheridge 2015-03-01 15:52:56 +00:00
parent c01f444d52
commit eef9a30cad

View File

@ -134,6 +134,9 @@ void FractoriumOptionsDialog::OnPlatformComboCurrentIndexChanged(int index)
for (size_t i = 0; i < devices.size(); i++)
ui.DeviceCombo->addItem(QString::fromStdString(devices[i]));
if (ui.PlatformCombo->currentIndex() == m_Settings->PlatformIndex())
ui.DeviceCombo->setCurrentIndex(m_Settings->DeviceIndex());
}
/// <summary>