Skip to content

Commit 4d666c6

Browse files
committed
Fix undo/redo handling in PopupComponent to respect acquisition status and signal chain lock
1 parent 40ea1af commit 4d666c6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Source/UI/PopupComponent.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*/
2323

2424
#include "PopupComponent.h"
25+
#include "EditorViewport.h"
2526
#include "UIComponent.h"
2627

2728
#include "../CoreServices.h"
@@ -89,6 +90,13 @@ bool PopupComponent::keyPressed (const KeyPress& key)
8990
return false;
9091
}
9192

93+
if (CoreServices::getAcquisitionStatus()
94+
&& undoManager->getUndoDescription().contains ("Disabled during acquisition"))
95+
return false;
96+
97+
if (AccessClass::getEditorViewport()->isSignalChainLocked())
98+
return false;
99+
92100
undoManager->undo();
93101

94102
if (parent != nullptr)
@@ -109,6 +117,13 @@ bool PopupComponent::keyPressed (const KeyPress& key)
109117
return false;
110118
}
111119

120+
if (CoreServices::getAcquisitionStatus()
121+
&& undoManager->getRedoDescription().contains ("Disabled during acquisition"))
122+
return false;
123+
124+
if (AccessClass::getEditorViewport()->isSignalChainLocked())
125+
return false;
126+
112127
undoManager->redo();
113128

114129
if (parent != nullptr)

0 commit comments

Comments
 (0)