Warn when loading a game, if there is already an existing game

This commit is contained in:
Olivier Teulière 2012-02-25 21:40:39 +01:00
parent cae5f38af5
commit 7195f3415c

View file

@ -718,6 +718,13 @@ void MainWindow::onGameLoad()
return; return;
} }
if (m_game)
{
QString msg = _q("Loading a saved game will stop the current game.");
if (!QtCommon::requestConfirmation(msg, "", this))
return;
}
QString fileName = QFileDialog::getOpenFileName(this, _q("Load a game")); QString fileName = QFileDialog::getOpenFileName(this, _q("Load a game"));
if (fileName != "") if (fileName != "")
{ {