Fix catch juice stream vertex remove operation not undoing

This commit is contained in:
Bartłomiej Dach 2024-07-22 13:21:49 +02:00
parent 64381d4087
commit 47964f33d7
No known key found for this signature in database
1 changed files with 10 additions and 0 deletions

View File

@ -54,7 +54,11 @@ protected override bool OnMouseDown(MouseDownEvent e)
if (e.Button == MouseButton.Left && e.ShiftPressed)
{
changeHandler?.BeginChange();
RemoveVertex(index);
UpdateHitObjectFromPath(juiceStream);
changeHandler?.EndChange();
return true;
}
@ -125,11 +129,17 @@ private void selectOnly(int index)
private void deleteSelectedVertices()
{
changeHandler?.BeginChange();
for (int i = VertexCount - 1; i >= 0; i--)
{
if (VertexStates[i].IsSelected)
RemoveVertex(i);
}
UpdateHitObjectFromPath(juiceStream);
changeHandler?.EndChange();
}
}
}