mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-27 09:58:08 +01:00
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:
parent
0fccb18855
commit
db4cc393ab
1 changed files with 2 additions and 2 deletions
|
@ -149,8 +149,8 @@ void ToppingWidget::refresh()
|
||||||
lineEditCoords->clear();
|
lineEditCoords->clear();
|
||||||
lineEditRack->setEnabled(true);
|
lineEditRack->setEnabled(true);
|
||||||
lineEditTotalScore->setText(QString("%1").arg(m_game->getCurrentPlayer().getTotalScore()));
|
lineEditTotalScore->setText(QString("%1").arg(m_game->getCurrentPlayer().getTotalScore()));
|
||||||
// Do not allow entering a move when displaying an old turn
|
// Do not allow entering a move when displaying an old turn or if the game is finished
|
||||||
setEnabled(m_game->isLastTurn());
|
setEnabled(m_game->isLastTurn() && !m_game->isFinished());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue