One more bugfix for PDF conversion

This commit is contained in:
Rick Falkvinge
2018-02-03 18:55:33 +01:00
parent 4eb473d1b9
commit 186bbb03d1
+4 -1
View File
@@ -130,6 +130,9 @@ namespace Swarmops.Logic.Support
}
}
// Set progress to 100% to avoid rounding errors freezing the UI at 99%
BroadcastProgress(organization, guid, 100);
return result;
}
@@ -192,7 +195,7 @@ namespace Swarmops.Logic.Support
}
}
progress = progressRange.Minimum + progressRange.Range / 2 + (pageCounter + 1) * progressRange.Range / pdfPageCount;
progress = progressRange.Minimum + progressRange.Range / 2 + ((pageCounter + 1) * progressRange.Range / pdfPageCount) / 2;
if (progress > lastProgress)
{
BroadcastProgress(organization, guid, progress);