mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-02-05 08:48:28 +01:00
Arbitration: disable controls for a finished game only in the last turn
This commit is contained in:
parent
7af3f6a801
commit
fdc1478cf4
1 changed files with 5 additions and 4 deletions
|
@ -246,10 +246,11 @@ void ArbitrationWidget::refresh()
|
|||
lineEditRack->setReadOnly(!isLastTurn);
|
||||
buttonRandom->setEnabled(isLastTurn);
|
||||
|
||||
if (m_game->isFinished())
|
||||
{
|
||||
setEnabled(false);
|
||||
}
|
||||
// Disable controls when the game is finished, but only
|
||||
// for the last turn (to allow changing players moves in
|
||||
// previous turns, for example)
|
||||
bool disable = m_game->isFinished() && isLastTurn;
|
||||
setEnabled(!disable);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue