This commit is contained in:
blitzmann
2018-06-16 17:04:29 -04:00
parent 7e6fc4e6c2
commit 4e8e5d86c4
2 changed files with 23 additions and 13 deletions

View File

@@ -104,7 +104,7 @@ class AttributeSlider(wx.Panel):
elif mod > 1:
modEnd = self.UserMaxValue
slider_percentage = ((mod-1)/(modEnd-1)) * 100
print(slider_percentage)
# print(slider_percentage)
if self.inverse:
slider_percentage *= -1
self.slider.SetValue(slider_percentage)

View File

@@ -58,14 +58,14 @@ class ItemMutator(wx.Panel):
worse_range = max_t
else:
worse_range = min_t
print("{}: \nHigh is good: {}".format(m.attribute.displayName, m.attribute.highIsGood))
print("Value {}".format(m.baseValue))
print(min_t)
print(max_t)
print(better_range)
print(worse_range)
#
# print("{}: \nHigh is good: {}".format(m.attribute.displayName, m.attribute.highIsGood))
# print("Value {}".format(m.baseValue))
#
# print(min_t)
# print(max_t)
# print(better_range)
# print(worse_range)
font = parent.GetFont()
font.SetWeight(wx.BOLD)
@@ -148,9 +148,19 @@ class ItemMutator(wx.Panel):
def callLater(self):
self.timer = None
print("recalc fit")
sFit = Fit.getInstance()
sFit.refreshFit(self.activeFit)
# todo BUG: if fit is not currently active, this causes the changed fit to show...?
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.activeFit))
# recalc the fit that this module affects. This is not necessarily the currently active fit
sFit.refreshFit(self.activeFit)
mainFrame = gui.mainFrame.MainFrame.getInstance()
activeFit = mainFrame.getActiveFit()
if activeFit != self.activeFit:
# if we're no longer on the fit this module is affecting, simulate a "switch fit" so that the active fit
# can be recalculated (if needed)
sFit.switchFit(activeFit)
# Send signal to GUI to update stats with current active fit
wx.PostEvent(mainFrame, GE.FitChanged(fitID=activeFit))