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:
parent
b743bd5dd8
commit
f49c1957a0
1 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue