port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using System.Collections.Generic;
using System.Linq;
using Intromat.Interfaces;
using ReactiveUI;
namespace Intromat.ViewModels
{
public class UndoItemGroup : ReactiveObject, IUndoItem
{
public List<IUndoItem> Items = new();
public UndoItemGroup(IFile file)
{
File = file;
}
public IFile File { get; }
public void Redo()
{
foreach (var item in Items)
item.Redo();
}
public void Undo()
{
foreach (var item in Items.Reverse<IUndoItem>())
item.Undo();
}
public void Push(IUndoItem item)
{
Items.Add(item);
}
}
}