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

Method __handleVector

graphs/gui/ctrlPanel.py:208–223  ·  view source on GitHub ↗
(self, vectorDef, vector, handledHandles, mainInputHandle)

Source from the content-addressed store, hash-verified

206 self.__addInputCheckbox(checkboxDef, handledHandles)
207
208 def __handleVector(self, vectorDef, vector, handledHandles, mainInputHandle):
209 handledHandles.add(vectorDef.lengthHandle)
210 handledHandles.add(vectorDef.angleHandle)
211 try:
212 storedLength = self._storedConsts[(vectorDef.lengthHandle, vectorDef.lengthUnit)]
213 except KeyError:
214 pass
215 else:
216 vector.SetLength(storedLength / 100)
217 try:
218 storedAngle = self._storedConsts[(vectorDef.angleHandle, vectorDef.angleUnit)]
219 except KeyError:
220 pass
221 else:
222 vector.SetAngle(storedAngle)
223 vector.SetDirectionOnly(vectorDef.lengthHandle == mainInputHandle)
224
225 def __addInputField(self, inputDef, handledHandles, mainInput=False):
226 if not self.__checkInputConditions(inputDef):

Callers 1

_updateInputsMethod · 0.95

Calls 3

SetLengthMethod · 0.80
SetAngleMethod · 0.80
SetDirectionOnlyMethod · 0.80

Tested by

no test coverage detected