Fixed disabling GUI after error.

--HG--
branch : develop
This commit is contained in:
dismine 2014-10-28 13:32:10 +02:00
parent 601cfa47d6
commit c447992e47

View File

@ -1522,7 +1522,8 @@ void MainWindow::SetEnabledGUI(bool enabled)
{ {
if (enabled == false) if (enabled == false)
{ {
CancelTool(); ArrowTool();
qApp->getUndoStack()->clear();
} }
comboBoxDraws->setEnabled(enabled); comboBoxDraws->setEnabled(enabled);
ui->actionOptionDraw->setEnabled(enabled); ui->actionOptionDraw->setEnabled(enabled);
@ -1538,6 +1539,9 @@ void MainWindow::SetEnabledGUI(bool enabled)
ui->actionDraw->setEnabled(enabled); ui->actionDraw->setEnabled(enabled);
ui->actionDetails->setEnabled(enabled); ui->actionDetails->setEnabled(enabled);
ui->actionTable->setEnabled(enabled); ui->actionTable->setEnabled(enabled);
ui->actionLayout->setEnabled(enabled);
ui->actionZoomFitBest->setEnabled(enabled);
ui->actionZoomOriginal->setEnabled(enabled);
guiEnabled = enabled; guiEnabled = enabled;
sceneDraw->SetDisable(!enabled); sceneDraw->SetDisable(!enabled);