Commit 295ba2bb authored by Tobias Hunger's avatar Tobias Hunger
Browse files

DeviceKitInformation: Do not change device in kit when adding a new device.



Change-Id: I4362e013fffd267f795780ef2816756dc059fe19
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent f65abb71
......@@ -346,15 +346,19 @@ void DeviceInformationConfigWidget::manageDevices()
void DeviceInformationConfigWidget::modelAboutToReset()
{
m_selectedId = m_model->deviceId(m_comboBox->currentIndex());
m_ignoreChange = true;
}
void DeviceInformationConfigWidget::modelReset()
{
m_comboBox->setCurrentIndex(m_model->indexForId(m_selectedId));
m_ignoreChange = false;
}
void DeviceInformationConfigWidget::currentDeviceChanged()
{
if (m_ignoreChange)
return;
DeviceKitInformation::setDeviceId(m_kit, m_model->deviceId(m_comboBox->currentIndex()));
}
......
......@@ -159,6 +159,7 @@ private slots:
private:
bool m_isReadOnly;
bool m_ignoreChange;
QComboBox *m_comboBox;
QPushButton *m_manageButton;
DeviceManagerModel *m_model;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment