diff --git a/OpenNest.Core/Collections/ObservableList.cs b/OpenNest.Core/Collections/ObservableList.cs index 192c420..cd79bb2 100644 --- a/OpenNest.Core/Collections/ObservableList.cs +++ b/OpenNest.Core/Collections/ObservableList.cs @@ -46,7 +46,8 @@ namespace OpenNest.Collections public bool Remove(T item) { var success = items.Remove(item); - ItemRemoved?.Invoke(this, new ItemRemovedEventArgs(item, success)); + if (success) + ItemRemoved?.Invoke(this, new ItemRemovedEventArgs(item, success)); return success; } diff --git a/OpenNest/Controls/PlateView.cs b/OpenNest/Controls/PlateView.cs index d0c3792..5a454bc 100644 --- a/OpenNest/Controls/PlateView.cs +++ b/OpenNest/Controls/PlateView.cs @@ -386,7 +386,11 @@ namespace OpenNest.Controls switch (e.KeyCode) { case Keys.Delete: - if (selectedCutOff != null) + if (currentAction is ActionClone) + { + SetAction(typeof(ActionSelect)); + } + else if (selectedCutOff != null) { Plate.CutOffs.Remove(selectedCutOff); selectedCutOff = null;