Maemo: Fix device configuration update glitches.

Task-number: https://projects.maemo.org/bugzilla/show_bug.cgi?id=192729
Reviewed-by: kh1
This commit is contained in:
Christian Kandeler
2010-09-21 13:49:18 +02:00
parent fb1f2069db
commit e2dc7a1da6
2 changed files with 4 additions and 2 deletions

View File

@@ -66,9 +66,10 @@ void MaemoDeviceConfigListModel::setupList()
void MaemoDeviceConfigListModel::setCurrentIndex(int index)
{
if (index != m_currentIndex) {
const quint64 idForIndex = m_devConfigs.at(index).internalId;
if (idForIndex != m_currentId) {
m_currentId = idForIndex;
m_currentIndex = index;
m_currentId = m_devConfigs.at(m_currentIndex).internalId;
emit currentChanged();
}
}

View File

@@ -202,6 +202,7 @@ void MaemoSettingsWidget::display(const MaemoDeviceConfig &devConfig)
otherConfig->server.timeout = devConfig.server.timeout;
otherConfig->server.pwd = devConfig.server.pwd;
otherConfig->server.privateKeyFile = devConfig.server.privateKeyFile;
otherConfig->internalId = devConfig.internalId;
if (devConfig.server.authType == Core::SshConnectionParameters::AuthByPwd)
m_ui->passwordButton->setChecked(true);