Skip to content

Commit efb558a

Browse files
committed
Fix issue with heat calculation & all-fit-refresh
1 parent 21c5854 commit efb558a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎gui/builtinViewColumns/heat.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ class Heat(ViewColumn):
136136

137137
def __init__(self, fittingView, params):
138138
ViewColumn.__init__(self, fittingView)
139-
import gui.mainFrame
140-
141-
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
142139
self.resizable = False
143140
self.size = 54
144141
self.maxsize = self.size * 2
@@ -150,7 +147,9 @@ def getText(self, mod):
150147
if not isinstance(mod, Module) or mod.state != FittingModuleState.OVERHEATED:
151148
return ""
152149

153-
thermo = Thermodynamics(Fit.getInstance().getFit(self.mainFrame.getActiveFit()))
150+
# Use the fit the view shows, which is not the same as active one (could be another fit
151+
# getting refreshed)
152+
thermo = Thermodynamics(Fit.getInstance().getFit(self.fittingView.getActiveFit()))
154153
burnCycles = thermo.calcBurnCycles(mod)
155154
duration = mod.getModifiedItemAttr("duration") / 1000
156155
speed = mod.getModifiedItemAttr("speed") / 1000

0 commit comments

Comments
 (0)