Gray out the players area when the game is finished.

This was broken since 196e02f9ad.
This commit is contained in:
Olivier Teulière 2013-01-29 22:55:20 +01:00
parent afc791dd73
commit cdbb53f72c
3 changed files with 4 additions and 2 deletions

View file

@ -64,6 +64,8 @@ Duplicate::Duplicate(const GameParams &iParams, const Game *iMasterGame)
int Duplicate::play(const wstring &iCoord, const wstring &iWord)
{
ASSERT(!isFinished(), "The game is already finished");
Player &currPlayer = *m_players[m_currPlayer];
ASSERT(currPlayer.isHuman(), "Human player expected");

View file

@ -115,7 +115,7 @@ void PlayerWidget::refresh()
lineEditCoords->clear();
lineEditChange->clear();
if (!m_game->isLastTurn())
if (!m_game->isLastTurn() || m_game->isFinished())
{
// Do not allow entering a move when displaying an old turn
setEnabled(false);

View file

@ -165,7 +165,7 @@ void TrainingWidget::refresh()
pushButtonSearch->setEnabled(m_model->rowCount() == 0 &&
lineEditRack->text() != "");
// Do not allow entering a move when displaying an old turn
setEnabled(m_game->isLastTurn());
setEnabled(m_game->isLastTurn() && !m_game->isFinished());
}
}