mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-30 05:15:59 +02:00
Fixed undo text corruption bug
This commit is contained in:
parent
1625d511be
commit
6a5b0b49ed
3 changed files with 68 additions and 6 deletions
|
@ -75,6 +75,11 @@ namespace Beefy.utils
|
|||
{
|
||||
return Math.Min(mBatchSize, 256); // Don't allow a large batch (ie: rename) to cause us to pull too much out of the undo buffer
|
||||
}
|
||||
|
||||
public override void ToString(String strBuffer)
|
||||
{
|
||||
strBuffer.AppendF($"UndoBatchStart {mName}");
|
||||
}
|
||||
}
|
||||
|
||||
public class UndoBatchEnd : UndoAction, IUndoBatchEnd
|
||||
|
@ -95,6 +100,11 @@ namespace Beefy.utils
|
|||
return mBatchStart;
|
||||
}
|
||||
}
|
||||
|
||||
public override void ToString(String strBuffer)
|
||||
{
|
||||
strBuffer.AppendF($"UndoBatchEnd {Name}");
|
||||
}
|
||||
}
|
||||
|
||||
public class UndoManager
|
||||
|
@ -307,5 +317,21 @@ namespace Beefy.utils
|
|||
{
|
||||
return mUndoIdx;
|
||||
}
|
||||
|
||||
public override void ToString(String str)
|
||||
{
|
||||
for (int i < mUndoList.Count)
|
||||
{
|
||||
if (i == mUndoIdx)
|
||||
str.Append(">");
|
||||
else
|
||||
str.Append(" ");
|
||||
|
||||
var entry = mUndoList[i];
|
||||
str.AppendF($"{i}. {entry}");
|
||||
|
||||
str.Append("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue