diff --git a/ChangeLog.txt b/ChangeLog.txt index 5be5681f1..464dbfd7b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,5 @@ # Version 0.4.3 +- [#454] Crash: using CRTL+Z while using line tool - Fixed broken saving pattern description. - Fixed UI bug. Release a dialog size for deploying a formula field. - Fixed broken formula when for system locale thousand separator is a space. diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 852a3a3bf..ee1f3cde4 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1635,6 +1635,12 @@ void MainWindow::CancelTool() ui->actionArrowTool->setChecked(false); helpLabel->setText(""); ui->actionStopTool->setEnabled(true); + + // Crash: using CRTL+Z while using line tool. + // related bug report: + // https://bitbucket.org/dismine/valentina/issues/454/crash-using-crtl-z-while-using-line-tool + undoAction->setEnabled(false); + redoAction->setEnabled(false); return; case Tool::BasePoint: Q_UNREACHABLE(); //-V501 @@ -1732,6 +1738,12 @@ void MainWindow::CancelTool() } currentScene->setFocus(Qt::OtherFocusReason); currentScene->clearSelection(); + + // Crash: using CRTL+Z while using line tool. + // related bug report: + // https://bitbucket.org/dismine/valentina/issues/454/crash-using-crtl-z-while-using-line-tool + undoAction->setEnabled(qApp->getUndoStack()->canUndo()); + redoAction->setEnabled(qApp->getUndoStack()->canRedo()); } //---------------------------------------------------------------------------------------------------------------------