From 4d666c6ce5b9f6a5e4e0f69998fa427ce795ead0 Mon Sep 17 00:00:00 2001 From: Anjal Doshi Date: Thu, 19 Dec 2024 16:51:32 -0800 Subject: [PATCH] Fix undo/redo handling in PopupComponent to respect acquisition status and signal chain lock --- Source/UI/PopupComponent.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Source/UI/PopupComponent.cpp b/Source/UI/PopupComponent.cpp index 6cf5095ba..68c482285 100644 --- a/Source/UI/PopupComponent.cpp +++ b/Source/UI/PopupComponent.cpp @@ -22,6 +22,7 @@ */ #include "PopupComponent.h" +#include "EditorViewport.h" #include "UIComponent.h" #include "../CoreServices.h" @@ -89,6 +90,13 @@ bool PopupComponent::keyPressed (const KeyPress& key) return false; } + if (CoreServices::getAcquisitionStatus() + && undoManager->getUndoDescription().contains ("Disabled during acquisition")) + return false; + + if (AccessClass::getEditorViewport()->isSignalChainLocked()) + return false; + undoManager->undo(); if (parent != nullptr) @@ -109,6 +117,13 @@ bool PopupComponent::keyPressed (const KeyPress& key) return false; } + if (CoreServices::getAcquisitionStatus() + && undoManager->getRedoDescription().contains ("Disabled during acquisition")) + return false; + + if (AccessClass::getEditorViewport()->isSignalChainLocked()) + return false; + undoManager->redo(); if (parent != nullptr)