Table of Contents

Method SavingInGroup

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

SavingInGroup(Action)

Runs a save from inside a group of edits, which Save() and SaveAs(string) refuse: the group is closed for the save, so that what it has made so far is a step the drawing is saved with, and opened again after it, under the same name and as deep. Its edits after the save are a step that joins the first, so that one undo takes back both, as it takes back a group nothing was saved in. A group left open with no edit made yet makes no step, and the edits after the save are the group's step alone. A group cancelled after the save takes back only what followed it: the file cannot be taken back, and the step it was saved with stays. With no group open the save is simply run.

public void SavingInGroup(Action save)

Parameters

save Action

The save, a call of Save() or SaveAs(string) on this drawing; whatever it throws is thrown after the group is opened again.

Exceptions

ArgumentNullException

Thrown when the save is null.