1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Properly restricted Undo/Redo during readonly

This commit is contained in:
Brian Fiete 2021-06-29 08:36:31 -07:00
parent b743bd5dd8
commit f49c1957a0

View file

@ -1985,6 +1985,9 @@ namespace Beefy.widgets
{ {
scope AutoBeefPerf("EWC.Undo"); scope AutoBeefPerf("EWC.Undo");
if (CheckReadOnly())
return;
//Profiler.StartSampling(); //Profiler.StartSampling();
if (WantsUndo) if (WantsUndo)
mData.mUndoManager.Undo(); mData.mUndoManager.Undo();
@ -1995,6 +1998,9 @@ namespace Beefy.widgets
{ {
scope AutoBeefPerf("EWC.Redo"); scope AutoBeefPerf("EWC.Redo");
if (CheckReadOnly())
return;
if (WantsUndo) if (WantsUndo)
mData.mUndoManager.Redo(); mData.mUndoManager.Redo();
} }