From 732c2c7e9eff38efaffa90016727a7264d407dac Mon Sep 17 00:00:00 2001 From: Ford Smith Date: Tue, 27 Apr 2021 13:51:32 -0400 Subject: [PATCH] UI: Fix undo/redo enabling redo with no items in redo --- UI/undo-stack-obs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI/undo-stack-obs.cpp b/UI/undo-stack-obs.cpp index 6261a95ff..1f821bcd6 100644 --- a/UI/undo-stack-obs.cpp +++ b/UI/undo-stack-obs.cpp @@ -116,7 +116,8 @@ void undo_stack::enable_undo_redo() last_is_repeatable = false; ui->actionMainUndo->setDisabled(false); - ui->actionMainRedo->setDisabled(false); + if (redo_items.size() > 0) + ui->actionMainRedo->setDisabled(false); } void undo_stack::disable_undo_redo()