public override void Undo()
{
int swap_width = PintaCore.Workspace.ImageSize.X;
int swap_height = PintaCore.Workspace.ImageSize.Y;
PintaCore.Workspace.ImageSize = new Cairo.Point (old_width, old_height);
PintaCore.Workspace.CanvasSize = new Cairo.Point (old_width, old_height);
old_width = swap_width;
old_height = swap_height;
base.Undo ();
if (RestorePath != null) {
Cairo.Path old = PintaCore.Layers.SelectionPath;
PintaCore.Layers.SelectionPath = RestorePath.Clone ();
if (old != null)
(old as IDisposable).Dispose ();
PintaCore.Layers.ShowSelection = true;
} else {
PintaCore.Layers.ResetSelectionPath ();
}
PintaCore.Workspace.Invalidate ();
}