Code quality changes

This commit is contained in:
Robin 2016-09-22 20:40:13 +02:00
commit 610f45d082
189 changed files with 4609 additions and 5203 deletions

View file

@ -46,10 +46,7 @@ namespace Greenshot.Memento
{
if (disposing)
{
if (_containerList != null)
{
_containerList.Dispose();
}
_containerList?.Dispose();
}
_containerList = null;
_surface = null;
@ -62,9 +59,6 @@ namespace Greenshot.Memento
public IMemento Restore()
{
// Store the selected state, as it's overwritten by the RemoveElement
bool selected = _containerList.Selected;
var oldState = new DeleteElementsMemento(_surface, _containerList);
_surface.RemoveElements(_containerList, false);