We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08cb1ec commit 6a731d4Copy full SHA for 6a731d4
1 file changed
AudioCuesheetEditor/Services/UI/TraceChangeManager.cs
@@ -217,14 +217,11 @@ public bool BulkEdit
217
public void MergeLastEditWithEdit(Func<TracedChanges, bool> targetEdit)
218
{
219
var edit = undoStack.FirstOrDefault(targetEdit);
220
- if (edit != null)
+ if ((edit != null) && (undoStack.Count > 0))
221
222
- if (undoStack.Count > 0)
223
- {
224
- var lastEdits = undoStack.Pop();
225
- edit.Changes.AddRange(lastEdits.Changes);
226
- UndoDone?.Invoke(this, EventArgs.Empty);
227
- }
+ var lastEdits = undoStack.Pop();
+ edit.Changes.AddRange(lastEdits.Changes);
+ UndoDone?.Invoke(this, EventArgs.Empty);
228
}
229
230
0 commit comments