- Better fix than the one from rc7f5c3bd7f8c. Now just scrolling back till net/nettype/main page. Not tested aswell.
authorunc0rr
Sat, 27 Oct 2012 22:23:41 +0400
changeset 7842 d1c0e4341165
parent 7841 43e68ac28d79
child 7843 a1a4aa5ae61b
- Better fix than the one from rc7f5c3bd7f8c. Now just scrolling back till net/nettype/main page. Not tested aswell. - Fix couple warnings
QTfrontend/hwform.cpp
QTfrontend/model/playerslistmodel.cpp
QTfrontend/ui/page/pagegamestats.cpp
--- a/QTfrontend/hwform.cpp	Sat Oct 27 20:05:52 2012 +0200
+++ b/QTfrontend/hwform.cpp	Sat Oct 27 22:23:41 2012 +0400
@@ -1291,11 +1291,12 @@
         QString errorStr = QMessageBox::tr("Connection to server is lost") + (reason.isEmpty()?"":("\n\n" + HWNewNet::tr("Quit reason: ") + '"' + reason +'"'));
         ShowErrorMessage(errorStr);
     }
-    if (ui.Pages->currentIndex() != ID_PAGE_NET)
+
+    while (ui.Pages->currentIndex() != ID_PAGE_NET
+        && ui.Pages->currentIndex() != ID_PAGE_NETTYPE
+        && ui.Pages->currentIndex() != ID_PAGE_MAIN)
     {
-        while (!PagesStack.isEmpty()) PagesStack.pop();
-        PagesStack.push(ID_PAGE_MAIN);
-        GoToPage(ID_PAGE_NET);
+        GoBack();
     }
 }
 
--- a/QTfrontend/model/playerslistmodel.cpp	Sat Oct 27 20:05:52 2012 +0200
+++ b/QTfrontend/model/playerslistmodel.cpp	Sat Oct 27 22:23:41 2012 +0400
@@ -230,13 +230,19 @@
         QPainter painter(&result);
 
         if(index.data(RoomFilterRole).toBool())
+        {
             if(index.data(InGame).toBool())
+            {
                 painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/ingame.png"));
+            }
             else
+            {
                 if(index.data(Ready).toBool())
                     painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/lamp.png"));
                 else
                     painter.drawPixmap(0, 0, 16, 16, QPixmap(":/res/chat/lamp_off.png"));
+            }
+        }
 
         QString mainIconName(":/res/chat/");
 
--- a/QTfrontend/ui/page/pagegamestats.cpp	Sat Oct 27 20:05:52 2012 +0200
+++ b/QTfrontend/ui/page/pagegamestats.cpp	Sat Oct 27 22:23:41 2012 +0400
@@ -140,7 +140,7 @@
     while (i != healthPoints.constEnd())
     {
         quint32 c = i.key();
-        QColor clanColor = QColor(qRgb((c >> 16) & 255, (c >> 8) & 255, c & 255));
+        //QColor clanColor = QColor(qRgb((c >> 16) & 255, (c >> 8) & 255, c & 255));
         QVector<quint32> hps = i.value();
 
         QPainterPath path;