diff --git a/ChangeLog.txt b/ChangeLog.txt index 69b4264b9..7e6ee7ee5 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -11,6 +11,7 @@ - [#385] Add 'Open Recent' option in Tape.exe, 'File' dropdown menu. # 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 122b2b302..310c9bfaa 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1674,6 +1674,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 @@ -1774,6 +1780,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()); } //---------------------------------------------------------------------------------------------------------------------