fix(ui): set Description in phase-level progress reports
ReportProgress was not setting Description, so the Detail row always showed the default em-dash. Now each phase report includes a meaningful description, and UpdateProgress always updates the label (resetting to em-dash when null). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -865,7 +865,8 @@ namespace OpenNest
|
|||||||
BestPartCount = score.Count,
|
BestPartCount = score.Count,
|
||||||
BestDensity = score.Density,
|
BestDensity = score.Density,
|
||||||
UsableRemnantArea = workArea.Area() - totalPartArea,
|
UsableRemnantArea = workArea.Area() - totalPartArea,
|
||||||
BestParts = clonedParts
|
BestParts = clonedParts,
|
||||||
|
Description = $"{phase}: {score.Count} parts, {score.Density:P1}"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,9 @@ namespace OpenNest.Forms
|
|||||||
densityValue.Text = progress.BestDensity.ToString("P1");
|
densityValue.Text = progress.BestDensity.ToString("P1");
|
||||||
remnantValue.Text = $"{progress.UsableRemnantArea:F1} sq in";
|
remnantValue.Text = $"{progress.UsableRemnantArea:F1} sq in";
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(progress.Description))
|
descriptionValue.Text = !string.IsNullOrEmpty(progress.Description)
|
||||||
descriptionValue.Text = progress.Description;
|
? progress.Description
|
||||||
|
: "\u2014";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowCompleted()
|
public void ShowCompleted()
|
||||||
|
|||||||
Reference in New Issue
Block a user