Fixed issue #454. Crash: using CRTL+Z while using line tool.

(grafted from 574b96a0b75cf276766eef61d2bb16ea79a604de)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-03-06 14:04:01 +02:00
parent e2a53028de
commit 3828d10bce
2 changed files with 13 additions and 0 deletions

View File

@ -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.

View File

@ -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());
}
//---------------------------------------------------------------------------------------------------------------------