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

Method _updateInputs

graphs/gui/ctrlPanel.py:173–206  ·  view source on GitHub ↗
(self, storeInputs=True)

Source from the content-addressed store, hash-verified

171 self.Thaw()
172
173 def _updateInputs(self, storeInputs=True):
174 if storeInputs:
175 self._storeCurrentValues()
176 # Clean up old inputs
177 for inputBox in (self._mainInputBox, *self._miscInputBoxes):
178 if inputBox is None:
179 continue
180 for child in (inputBox.textBox, inputBox.icon, inputBox.label):
181 if child is not None:
182 child.Destroy()
183 for checkbox in self._inputCheckboxes:
184 checkbox.checkBox.Destroy()
185 self.inputsSizer.Clear()
186 self._mainInputBox = None
187 self._miscInputBoxes.clear()
188 self._inputCheckboxes.clear()
189 # Update vectors
190 view = self.graphFrame.getView()
191 handledHandles = set()
192 if view.srcVectorDef is not None:
193 self.__handleVector(view.srcVectorDef, self.srcVector, handledHandles, self.xType.mainInput[0])
194 if view.tgtVectorDef is not None:
195 self.__handleVector(view.tgtVectorDef, self.tgtVector, handledHandles, self.xType.mainInput[0])
196 # Update inputs
197 self.__addInputField(view.inputMap[self.xType.mainInput], handledHandles, mainInput=True)
198 for inputDef in view.inputs:
199 if inputDef.handle in handledHandles:
200 continue
201 self.__addInputField(inputDef, handledHandles)
202 # Add checkboxes
203 for checkboxDef in view.checkboxes:
204 if checkboxDef.handle in handledHandles:
205 continue
206 self.__addInputCheckbox(checkboxDef, handledHandles)
207
208 def __handleVector(self, vectorDef, vector, handledHandles, mainInputHandle):
209 handledHandles.add(vectorDef.lengthHandle)

Callers 3

updateControlsMethod · 0.95
OnYTypeUpdateMethod · 0.95
OnXTypeUpdateMethod · 0.95

Calls 8

_storeCurrentValuesMethod · 0.95
__handleVectorMethod · 0.95
__addInputFieldMethod · 0.95
__addInputCheckboxMethod · 0.95
DestroyMethod · 0.45
ClearMethod · 0.45
clearMethod · 0.45
getViewMethod · 0.45

Tested by

no test coverage detected