Enable redo/undo actions if stack is not empty.
--HG-- branch : develop
This commit is contained in:
parent
71930befed
commit
d3b228df25
|
@ -1233,8 +1233,14 @@ void MainWindow::ActionDraw(bool checked)
|
||||||
ui->actionArrowTool->setEnabled(true);
|
ui->actionArrowTool->setEnabled(true);
|
||||||
ui->actionShowCurveDetails->setEnabled(true);
|
ui->actionShowCurveDetails->setEnabled(true);
|
||||||
actionDockWidgetToolOptions->setEnabled(true);
|
actionDockWidgetToolOptions->setEnabled(true);
|
||||||
undoAction->setEnabled(true);
|
if (qApp->getUndoStack()->canUndo())
|
||||||
redoAction->setEnabled(true);
|
{
|
||||||
|
undoAction->setEnabled(true);
|
||||||
|
}
|
||||||
|
if (qApp->getUndoStack()->canRedo())
|
||||||
|
{
|
||||||
|
redoAction->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (qApp->patternType() == MeasurementsType::Standard)
|
if (qApp->patternType() == MeasurementsType::Standard)
|
||||||
{
|
{
|
||||||
|
@ -1290,8 +1296,14 @@ void MainWindow::ActionDetails(bool checked)
|
||||||
ui->actionArrowTool->setEnabled(true);
|
ui->actionArrowTool->setEnabled(true);
|
||||||
ui->actionShowCurveDetails->setEnabled(false);
|
ui->actionShowCurveDetails->setEnabled(false);
|
||||||
actionDockWidgetToolOptions->setEnabled(true);
|
actionDockWidgetToolOptions->setEnabled(true);
|
||||||
undoAction->setEnabled(true);
|
if (qApp->getUndoStack()->canUndo())
|
||||||
redoAction->setEnabled(true);
|
{
|
||||||
|
undoAction->setEnabled(true);
|
||||||
|
}
|
||||||
|
if (qApp->getUndoStack()->canRedo())
|
||||||
|
{
|
||||||
|
redoAction->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (qApp->patternType() == MeasurementsType::Standard)
|
if (qApp->patternType() == MeasurementsType::Standard)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user