mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-27 09:58:08 +01:00
HistoryWidget: compute the player ID instead of getting it from TurnData
This commit is contained in:
parent
27c9b5015a
commit
7f3f29df31
1 changed files with 4 additions and 1 deletions
|
@ -189,7 +189,10 @@ void HistoryWidget::updateModel()
|
||||||
}
|
}
|
||||||
if (m_isFreeGame)
|
if (m_isFreeGame)
|
||||||
{
|
{
|
||||||
const wstring &name = m_game->getPlayer(t.getPlayer()).getName();
|
// In free game mode, the player id can be easily
|
||||||
|
// computed from the turn number
|
||||||
|
unsigned playerId = i % m_game->getNbPlayers();
|
||||||
|
const wstring &name = m_game->getPlayer(playerId).getName();
|
||||||
setCellData(rowNum, m_colPlayer, qfw(name));
|
setCellData(rowNum, m_colPlayer, qfw(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue