MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / fitChanged

Method fitChanged

gui/builtinAdditionPanes/projectedView.py:174–204  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

172 return fit.name
173
174 def fitChanged(self, event):
175 event.Skip()
176 activeFitID = self.mainFrame.getActiveFit()
177 if activeFitID is not None and activeFitID not in event.fitIDs:
178 return
179
180 sFit = Fit.getInstance()
181 fit = sFit.getFit(activeFitID)
182 # pyfalog.debug('ProjectedView::fitChanged: {}', repr(fit))
183
184 self.Parent.Parent.DisablePage(self, not fit or fit.isStructure)
185
186 # Clear list and get out if current fitId is None
187 if activeFitID is None and self.lastFitId is not None:
188 self.DeleteAllItems()
189 self.lastFitId = None
190 return
191
192
193
194 if activeFitID != self.lastFitId:
195 self.lastFitId = activeFitID
196
197 item = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_DONTCARE)
198
199 if item != -1:
200 self.EnsureVisible(item)
201
202 self.unselectAll()
203
204 self.refreshContents(fit)
205
206 def refreshContents(self, fit):
207 stuff = []

Callers

nothing calls this directly

Calls 6

refreshContentsMethod · 0.95
getFitMethod · 0.80
DisablePageMethod · 0.80
unselectAllMethod · 0.80
getActiveFitMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected