Training page: Don't change selection after changing team or playing
authorWuzzy <Wuzzy2@mail.ru>
Tue, 18 Dec 2018 22:27:13 +0100
changeset 14468 41f1b611cdd2
parent 14467 4edcb655dc5a
child 14469 bfacce4ff920
Training page: Don't change selection after changing team or playing
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Tue Dec 18 22:22:03 2018 +0100
+++ b/QTfrontend/hwform.cpp	Tue Dec 18 22:27:13 2018 +0100
@@ -2023,13 +2023,12 @@
 
         for(unsigned int i = 0; i < n; i++)
         {
-            QListWidgetItem* item = listWidget->takeItem(i);
+            QListWidgetItem* item = listWidget->item(i);
             QString missionName = QString(item->data(Qt::UserRole).toString()).replace(QString(" "),QString("_"));
             if(isMissionWon(missionName, tName))
                 item->setIcon(finishedIcon);
             else
                 item->setIcon(notFinishedIcon);
-            listWidget->insertItem(i, item);
         }
     }
 }