From 168622052316f8f840a538ad37dd338f1fd69119 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Fri, 3 Aug 2018 01:42:06 -0400 Subject: [PATCH] Fix the state change command to not store the modules themselves, but the positions --- gui/builtinViews/fittingView.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index 247003b55..74d02295c 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -268,7 +268,9 @@ class FittingView(d.Display): sel = [] row = self.GetFirstSelected() while row != -1: - sel.append(self.mods[self.GetItemData(row)]) + mod = self.mods[self.GetItemData(row)] + if mod and not isinstance(mod, Rack): + sel.append(mod) row = self.GetNextSelected(row) return sel @@ -629,7 +631,7 @@ class FittingView(d.Display): ctrl = event.cmdDown or event.middleIsDown click = "ctrl" if ctrl is True else "right" if event.GetButton() == 3 else "left" - self.mainFrame.command.Submit(cmd.GuiModuleStateChangeCommand(fitID, self.mods[self.GetItemData(row)], mods, click)) + self.mainFrame.command.Submit(cmd.GuiModuleStateChangeCommand(fitID, self.mods[self.GetItemData(row)].modPosition, [mod.modPosition for mod in mods], click)) # update state tooltip tooltip = self.activeColumns[col].getToolTip(self.mods[self.GetItemData(row)])