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

Method updateControls

graphs/gui/ctrlPanel.py:133–171  ·  view source on GitHub ↗
(self, layout=True)

Source from the content-addressed store, hash-verified

131 self._setVectorDefaults()
132
133 def updateControls(self, layout=True):
134 if layout:
135 self.Freeze()
136 self._clearStoredValues()
137 view = self.graphFrame.getView()
138
139 self.refreshAxeLabels()
140
141 # Vectors
142 self._setVectorDefaults()
143 if view.srcVectorDef is not None:
144 self.srcVector.Show(True)
145 self.srcVectorLabel.Show(True)
146 self.srcVectorLabel.SetLabel(view.srcVectorDef.label)
147 else:
148 self.srcVector.Show(False)
149 self.srcVectorLabel.Show(False)
150 if view.tgtVectorDef is not None:
151 self.tgtVector.Show(True)
152 self.tgtVectorLabel.Show(True)
153 self.tgtVectorLabel.SetLabel(view.tgtVectorDef.label)
154 else:
155 self.tgtVector.Show(False)
156 self.tgtVectorLabel.Show(False)
157
158 # Source and target list
159 self.refreshColumns(layout=False)
160 self.targetList.Show(view.hasTargets)
161
162 # Inputs
163 self._updateInputs(storeInputs=False)
164
165 # Context icon
166 self.contextIcon.Show(ContextMenu.hasMenu(self, None, None, (view.internalName,)))
167
168 if layout:
169 self.graphFrame.Layout()
170 self.graphFrame.UpdateWindowSize()
171 self.Thaw()
172
173 def _updateInputs(self, storeInputs=True):
174 if storeInputs:

Callers 2

__init__Method · 0.80
OnGraphSwitchedMethod · 0.80

Calls 10

_clearStoredValuesMethod · 0.95
refreshAxeLabelsMethod · 0.95
_setVectorDefaultsMethod · 0.95
refreshColumnsMethod · 0.95
_updateInputsMethod · 0.95
SetLabelMethod · 0.80
hasMenuMethod · 0.80
UpdateWindowSizeMethod · 0.80
getViewMethod · 0.45
ShowMethod · 0.45

Tested by

no test coverage detected