summaryrefslogtreecommitdiffstats
path: root/api/logic/net
diff options
context:
space:
mode:
authorJanrupf <werbung.janrupf@t-online.de>2018-03-03 21:22:00 +0100
committerJanrupf <werbung.janrupf@t-online.de>2018-03-11 19:30:47 +0100
commitb8ca36372be11b9ddddb3daa3d32583d286f19e2 (patch)
treeb359357881d14e0b0871b3e5d0175234eb562b72 /api/logic/net
parent2d295d5afbf6cb5ce1ca624c4aef8fd96b78992b (diff)
downloadMultiMC-b8ca36372be11b9ddddb3daa3d32583d286f19e2.tar
MultiMC-b8ca36372be11b9ddddb3daa3d32583d286f19e2.tar.gz
MultiMC-b8ca36372be11b9ddddb3daa3d32583d286f19e2.tar.lz
MultiMC-b8ca36372be11b9ddddb3daa3d32583d286f19e2.tar.xz
MultiMC-b8ca36372be11b9ddddb3daa3d32583d286f19e2.zip
GH-2124 First complete implementation, installing is working now! GH-2172 Added sorting
Diffstat (limited to 'api/logic/net')
-rw-r--r--api/logic/net/NetJob.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/logic/net/NetJob.cpp b/api/logic/net/NetJob.cpp
index 304b5820..1ff8e28f 100644
--- a/api/logic/net/NetJob.cpp
+++ b/api/logic/net/NetJob.cpp
@@ -84,6 +84,10 @@ void NetJob::partProgress(int index, qint64 bytesReceived, qint64 bytesTotal)
auto current = done * 1000 + doing * inprogress;
auto current_total = all * 1000;
// HACK: make sure it never jumps backwards.
+ // FAIL: This breaks if the size is not known (or is it something else?) and jumps to 1000, so if it is 1000 reset it to inprogress
+ if(m_current_progress == 1000) {
+ m_current_progress = inprogress;
+ }
if(m_current_progress > current)
{
current = m_current_progress;