Fix case where property gets reran multiple times.

This commit is contained in:
Ebag333
2017-02-26 08:46:23 -08:00
parent c430a2d798
commit e4d0f2dc6f
2 changed files with 4 additions and 4 deletions

View File

@@ -1171,6 +1171,10 @@ class Fit(object):
if force_recalc is False:
return self.__remoteReps
# We are rerunning the recalcs. Explicitly set to 0 to make sure we don't duplicate anything and correctly set all values to 0.
for remote_type in self.__remoteReps:
self.__remoteReps[remote_type] = 0
for module in self.modules:
# Skip empty and non-Active modules
if module.isEmpty or module.state < State.ACTIVE:
@@ -1213,9 +1217,6 @@ class Fit(object):
else:
hp = 0
if self.__remoteReps[remote_type] is None:
self.__remoteReps[remote_type] = 0
self.__remoteReps[remote_type] += (hp * fueledMultiplier) / duration
return self.__remoteReps

View File

@@ -1,7 +1,6 @@
# noinspection PyPackageRequirements
import wx
from logbook import Logger
import logging
import threading
import copy
import uuid