Order step shapes before draw

This commit is contained in:
Jaex 2016-05-22 23:43:19 +03:00
parent b131585a9d
commit eb8a9e5a90
2 changed files with 12 additions and 0 deletions

View file

@ -211,6 +211,8 @@ protected override void Draw(Graphics g)
effectShape.OnDraw(g);
}
ShapeManager.OrderStepShapes();
// Draw drawing shapes
foreach (BaseDrawingShape drawingShape in ShapeManager.DrawingShapes)
{

View file

@ -1315,6 +1315,16 @@ public void ResumeForm()
form.Resume();
}
public void OrderStepShapes()
{
int i = 1;
foreach (StepDrawingShape shape in Shapes.OfType<StepDrawingShape>())
{
shape.Number = i++;
}
}
private void OnCurrentShapeChanged(BaseShape shape)
{
if (CurrentShapeChanged != null)