From 8a19bf78cefcfeda0257d545b716b80ccf1771f4 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sun, 21 Apr 2019 21:30:32 +0300 Subject: [PATCH] Fix changing projected fit amount to 0 --- gui/fitCommands/gui/projectedFit/changeAmount.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/fitCommands/gui/projectedFit/changeAmount.py b/gui/fitCommands/gui/projectedFit/changeAmount.py index e046d3970..7c7a315a5 100644 --- a/gui/fitCommands/gui/projectedFit/changeAmount.py +++ b/gui/fitCommands/gui/projectedFit/changeAmount.py @@ -1,3 +1,5 @@ +import math + import wx import gui.mainFrame @@ -21,7 +23,7 @@ class GuiChangeProjectedFitAmountCommand(wx.Command): if self.amount > 0: cmd = CalcChangeProjectedFitAmountCommand(fitID=self.fitID, projectedFitID=self.projectedFitID, amount=self.amount) else: - cmd = CalcRemoveProjectedFitCommand(fitID=self.fitID, projectedFitID=self.projectedFitID) + cmd = CalcRemoveProjectedFitCommand(fitID=self.fitID, projectedFitID=self.projectedFitID, amount=math.inf) success = self.internalHistory.submit(cmd) Fit.getInstance().recalc(self.fitID) wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))