Maemo: Fix logic in device configurations dialog.

Don't do anything when the "emulator" or "hardware" buttons are
clicked and are already checked.
This commit is contained in:
Christian Kandeler
2010-12-06 14:27:12 +01:00
parent addc149b57
commit 2b318539d4

View File

@@ -274,12 +274,14 @@ void MaemoDeviceConfigurationsSettingsWidget::configNameEditingFinished()
void MaemoDeviceConfigurationsSettingsWidget::deviceTypeChanged() void MaemoDeviceConfigurationsSettingsWidget::deviceTypeChanged()
{ {
const QString name = currentConfig().name;
const MaemoDeviceConfig::DeviceType devType = const MaemoDeviceConfig::DeviceType devType =
m_ui->deviceButton->isChecked() m_ui->deviceButton->isChecked()
? MaemoDeviceConfig::Physical ? MaemoDeviceConfig::Physical
: MaemoDeviceConfig::Simulator; : MaemoDeviceConfig::Simulator;
if (currentConfig().type == devType)
return;
const QString name = currentConfig().name;
if (devType == MaemoDeviceConfig::Simulator) { if (devType == MaemoDeviceConfig::Simulator) {
m_lastConfigHW = currentConfig(); m_lastConfigHW = currentConfig();
currentConfig() = m_lastConfigSim; currentConfig() = m_lastConfigSim;