修复导出单个模式的时长错误

This commit is contained in:
ww-rm
2025-07-25 13:50:36 +08:00
parent e717eab6df
commit ca34494483
3 changed files with 5 additions and 5 deletions

View File

@@ -56,12 +56,12 @@ namespace SpineViewer.ViewModels.Exporters
var output = Path.Combine(_outputDir!, folderName);
if (_autoResolution) SetAutoResolutionAnimated(exporter, spines);
if (_duration < 0) exporter.Duration = spines.Select(sp => sp.GetAnimationMaxDuration()).DefaultIfEmpty(0).Max();
exporter.Duration = _duration >= 0 ? _duration : spines.Select(sp => sp.GetAnimationMaxDuration()).DefaultIfEmpty(0).Max();
exporter.ProgressReporter = (total, done, text) =>
{
pr.Total = total;
pr.Done = done;
pr.Total = total;
pr.Done = done;
pr.ProgressText = text;
_vmMain.ProgressValue = pr.Done / pr.Total;
};