Another try...
authorManuel Nickschas <sputnick@quassel-irc.org>
Mon, 18 Feb 2008 15:45:57 +0000 (15:45 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 18 Feb 2008 15:45:57 +0000 (15:45 +0000)
src/qtui/settingspages/networkssettingspage.cpp

index a09a0fe..573a033 100644 (file)
@@ -218,7 +218,10 @@ void NetworksSettingsPage::setItemState(NetworkId id, QListWidgetItem *item) {
       foreach(QListWidgetItem *i, items) {
         NetworkId oldid = i->data(Qt::UserRole).value<NetworkId>();
         if(oldid > 0) continue;  // only locally created nets should be replaced
       foreach(QListWidgetItem *i, items) {
         NetworkId oldid = i->data(Qt::UserRole).value<NetworkId>();
         if(oldid > 0) continue;  // only locally created nets should be replaced
-        if(oldid == currentId) select = true;
+        if(oldid == currentId) {
+          select = true;
+          currentId = 0;
+        }
         int row = ui.networkList->row(i);
         if(row >= 0) {
           qDebug() << "ABOUT TO REMOVE: id=" << oldid << "from row" << row;
         int row = ui.networkList->row(i);
         if(row >= 0) {
           qDebug() << "ABOUT TO REMOVE: id=" << oldid << "from row" << row;