From 96b4f864f6aa64abc6bdcc0f4c9540d2928c3e29 Mon Sep 17 00:00:00 2001 From: doitux Date: Sat, 7 Aug 2010 21:48:19 +0000 Subject: [PATCH] gui: disable vote for kick during ranking game --- src/gui/qt/gametable/myavatarlabel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/qt/gametable/myavatarlabel.cpp b/src/gui/qt/gametable/myavatarlabel.cpp index a63ff73b..f506877c 100644 --- a/src/gui/qt/gametable/myavatarlabel.cpp +++ b/src/gui/qt/gametable/myavatarlabel.cpp @@ -55,7 +55,9 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) { for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) { if((*it_c)->getMyActiveStatus()) activePlayerCounter++; } - if(activePlayerCounter > 2 && !voteRunning ) setVoteOnKickContextMenuEnabled(TRUE); + GameInfo info(myW->getSession()->getClientGameInfo(myW->getSession()->getClientCurrentGameId())); + + if(activePlayerCounter > 2 && !voteRunning && info.data.gameType != GAME_TYPE_RANKING) setVoteOnKickContextMenuEnabled(TRUE); else setVoteOnKickContextMenuEnabled(FALSE); action_IgnorePlayer->setEnabled(true);