Use UndoRecord.
- VERBESSERT: Formatierung erscheint nur noch als 1 Undo-Schritt.
This commit is contained in:
parent
8d24a669ac
commit
94ebf5508b
@ -121,7 +121,6 @@ namespace zaaReloaded2.Formatter
|
||||
{
|
||||
if (!CanRun) throw new NoLaboratoryDataException("No laboratory data to format.");
|
||||
|
||||
CreateStyles();
|
||||
int current = 0;
|
||||
while (current < Settings.Elements.Count)
|
||||
{
|
||||
@ -146,7 +145,14 @@ namespace zaaReloaded2.Formatter
|
||||
current++;
|
||||
}
|
||||
}
|
||||
|
||||
// Write everything to the Word document
|
||||
Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord(
|
||||
String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName)
|
||||
);
|
||||
CreateStyles();
|
||||
_secondaryBuffer.Flush();
|
||||
Globals.ThisAddIn.Application.UndoRecord.EndCustomRecord();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user