ToppingWidget: disable the widget at the end of the game.

This avoids a crash if the players tries to go on playing.
This commit is contained in:
Olivier Teulière 2013-04-09 19:40:15 +02:00
parent 0fccb18855
commit db4cc393ab

View file

@ -149,8 +149,8 @@ void ToppingWidget::refresh()
lineEditCoords->clear();
lineEditRack->setEnabled(true);
lineEditTotalScore->setText(QString("%1").arg(m_game->getCurrentPlayer().getTotalScore()));
// Do not allow entering a move when displaying an old turn
setEnabled(m_game->isLastTurn());
// Do not allow entering a move when displaying an old turn or if the game is finished
setEnabled(m_game->isLastTurn() && !m_game->isFinished());
}
}