diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index 23a5bcf3..d72a5e95 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -1074,6 +1074,9 @@ void gameTableImpl::refreshPlayerAvatar() PlayerList seatsList = currentGame->getSeatsList(); for (it_c=seatsList->begin(), seatPlace=0; it_c!=seatsList->end(); ++it_c, seatPlace++) { + //set uniqueID + playerAvatarLabelArray[(*it_c)->getMyID()]->setMyUniqueId((*it_c)->getMyUniqueID()); + //get CountryString QString countryString(QString(myStartWindow->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).countryCode.c_str()).toLower()); countryString = QString(":/cflags/cflags/%1.png").arg(countryString); diff --git a/src/gui/qt/gametable/myavatarlabel.cpp b/src/gui/qt/gametable/myavatarlabel.cpp index 363e4057..fcf0c8ed 100644 --- a/src/gui/qt/gametable/myavatarlabel.cpp +++ b/src/gui/qt/gametable/myavatarlabel.cpp @@ -42,7 +42,7 @@ using namespace std; MyAvatarLabel::MyAvatarLabel(QGroupBox* parent) - : QLabel(parent), voteRunning(false), transparent(false) + : QLabel(parent), voteRunning(false), transparent(false), myUniqueId(0) { myContextMenu = new QMenu; @@ -395,21 +395,14 @@ void MyAvatarLabel::paintEvent(QPaintEvent*) painter.setOpacity(1.0); //hide avatar if player is on ignore list - boost::shared_ptr currentGame = myW->myStartWindow->getSession()->getCurrentGame(); - PlayerListConstIterator it_c; - int seatPlace; - PlayerList seatsList = currentGame->getSeatsList(); - for (seatPlace=0,it_c=seatsList->begin(); it_c!=seatsList->end(); ++it_c, seatPlace++) { - if(seatPlace == myId) { - if(!playerIsOnIgnoreList(QString::fromUtf8((*it_c)->getMyName().c_str()))) { - painter.drawPixmap(0,0,myPixmap); - return; - } - else if(myW->getMyConfig()->readConfigInt("DontHideAvatarsOfIgnored")) { - painter.drawPixmap(0,0,myPixmap); - return; - } - } + boost::shared_ptr mySession = myW->myStartWindow->getSession(); + if(!playerIsOnIgnoreList(QString::fromUtf8(mySession->getClientPlayerInfo(myUniqueId).playerName.c_str()))) { + painter.drawPixmap(0,0,myPixmap); + return; + } + else if(myW->getMyConfig()->readConfigInt("DontHideAvatarsOfIgnored")) { + painter.drawPixmap(0,0,myPixmap); + return; } } diff --git a/src/gui/qt/gametable/myavatarlabel.h b/src/gui/qt/gametable/myavatarlabel.h index 1065e923..60d83ca9 100644 --- a/src/gui/qt/gametable/myavatarlabel.h +++ b/src/gui/qt/gametable/myavatarlabel.h @@ -55,6 +55,9 @@ public: void setMyId ( int theValue ) { myId = theValue; } + void setMyUniqueId ( int theValue ) { + myUniqueId = theValue; + } void contextMenuEvent ( QContextMenuEvent * event ); QString getPlayerTip(QString); int getPlayerRating(QString); @@ -95,10 +98,12 @@ private: QPixmap myPixmap; QString myPath; - int myId; bool myContextMenuEnabled; bool voteRunning; bool transparent; + int myId; + int myUniqueId; }; #endif + diff --git a/src/gui/qt/startwindow/startwindowimpl.cpp b/src/gui/qt/startwindow/startwindowimpl.cpp index 63fac6e0..bcdacc09 100644 --- a/src/gui/qt/startwindow/startwindowimpl.cpp +++ b/src/gui/qt/startwindow/startwindowimpl.cpp @@ -61,7 +61,7 @@ #ifdef ANDROID #ifndef ANDROID_TEST - #include "QtGui/5.1.0/QtGui/qpa/qplatformnativeinterface.h" + #include "QtGui/5.1.1/QtGui/qpa/qplatformnativeinterface.h" #include #endif #endif