prevent gui logging left-player and new-game-admin if gametable is not

visible
This commit is contained in:
doitux
2011-10-28 20:32:46 +00:00
parent 2a8b8d793f
commit 552e45e4d5
+2 -2
View File
@@ -347,14 +347,14 @@ void GuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string &play
QString tmpName(QString::fromUtf8(playerName.c_str()));
myStartWindow->signalNetClientPlayerLeft(playerId, tmpName);
myW->signalNetClientPlayerLeft(playerId);
if (!playerName.empty() && playerName[0] != '#')
if (!playerName.empty() && playerName[0] != '#' && myW->isVisible())
myGuiLog->signalLogPlayerLeftMsg(tmpName, removeReason == NTF_NET_REMOVED_KICKED);
}
void GuiWrapper::SignalNetClientNewGameAdmin(unsigned playerId, const string &playerName)
{
myStartWindow->signalNetClientNewGameAdmin(playerId, QString::fromUtf8(playerName.c_str()));
if (!playerName.empty() && playerName[0] != '#')
if (!playerName.empty() && playerName[0] != '#' && myW->isVisible())
myGuiLog->signalLogNewGameAdminMsg(QString::fromUtf8(playerName.c_str()));
}