GUI: put player on ignore list slot bugfix

This commit is contained in:
doitux
2010-03-30 19:38:14 +00:00
parent 72fa1fb9ec
commit b7809a6ca9
2 changed files with 13 additions and 8 deletions
@@ -1413,7 +1413,11 @@ bool gameLobbyDialogImpl::playerIsOnIgnoreList(unsigned playerId) {
} }
void gameLobbyDialogImpl::putPlayerOnIgnoreList(unsigned playerId) { void gameLobbyDialogImpl::putPlayerOnIgnoreList() {
if(!treeWidget_NickList->selectedItems().isEmpty()) {
unsigned playerId = treeWidget_NickList->selectedItems().at(0)->data(0, Qt::UserRole).toUInt();
if(!playerIsOnIgnoreList(playerId)) { if(!playerIsOnIgnoreList(playerId)) {
@@ -1424,5 +1428,6 @@ void gameLobbyDialogImpl::putPlayerOnIgnoreList(unsigned playerId) {
myChat->refreshIgnoreList(); myChat->refreshIgnoreList();
} }
}
} }
@@ -108,7 +108,7 @@ public slots:
void showInvitationDialog(unsigned gameId, unsigned playerIdFrom); void showInvitationDialog(unsigned gameId, unsigned playerIdFrom);
void chatInfoPlayerInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom); void chatInfoPlayerInvitation(unsigned gameId, unsigned playerIdWho, unsigned playerIdFrom);
void chatInfoPlayerRejectedInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason); void chatInfoPlayerRejectedInvitation(unsigned gameId, unsigned playerIdWho, DenyGameInvitationReason reason);
void putPlayerOnIgnoreList(unsigned playerid); void putPlayerOnIgnoreList();
bool playerIsOnIgnoreList(unsigned playerid); bool playerIsOnIgnoreList(unsigned playerid);
private: private: