From c447992e47c4ba9119d5b863e0a9f2da4ddadab4 Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 28 Oct 2014 13:32:10 +0200 Subject: [PATCH] Fixed disabling GUI after error. --HG-- branch : develop --- src/app/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index a4272a3d0..5f1d34d61 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -1522,7 +1522,8 @@ void MainWindow::SetEnabledGUI(bool enabled) { if (enabled == false) { - CancelTool(); + ArrowTool(); + qApp->getUndoStack()->clear(); } comboBoxDraws->setEnabled(enabled); ui->actionOptionDraw->setEnabled(enabled); @@ -1538,6 +1539,9 @@ void MainWindow::SetEnabledGUI(bool enabled) ui->actionDraw->setEnabled(enabled); ui->actionDetails->setEnabled(enabled); ui->actionTable->setEnabled(enabled); + ui->actionLayout->setEnabled(enabled); + ui->actionZoomFitBest->setEnabled(enabled); + ui->actionZoomOriginal->setEnabled(enabled); guiEnabled = enabled; sceneDraw->SetDisable(!enabled);