Arbitration: disable controls for a finished game only in the last turn

This commit is contained in:
Olivier Teulière 2012-06-05 01:04:25 +02:00
parent 7af3f6a801
commit fdc1478cf4

View file

@ -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);
}