Enable redo/undo actions if stack is not empty.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-05-23 18:37:55 +03:00
parent 71930befed
commit d3b228df25

View File

@ -1233,8 +1233,14 @@ void MainWindow::ActionDraw(bool checked)
ui->actionArrowTool->setEnabled(true);
ui->actionShowCurveDetails->setEnabled(true);
actionDockWidgetToolOptions->setEnabled(true);
if (qApp->getUndoStack()->canUndo())
{
undoAction->setEnabled(true);
}
if (qApp->getUndoStack()->canRedo())
{
redoAction->setEnabled(true);
}
if (qApp->patternType() == MeasurementsType::Standard)
{
@ -1290,8 +1296,14 @@ void MainWindow::ActionDetails(bool checked)
ui->actionArrowTool->setEnabled(true);
ui->actionShowCurveDetails->setEnabled(false);
actionDockWidgetToolOptions->setEnabled(true);
if (qApp->getUndoStack()->canUndo())
{
undoAction->setEnabled(true);
}
if (qApp->getUndoStack()->canRedo())
{
redoAction->setEnabled(true);
}
if (qApp->patternType() == MeasurementsType::Standard)
{