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

Method patternChanged

gui/patternEditor.py:240–265  ·  view source on GitHub ↗
(self, event=None)

Source from the content-addressed store, hash-verified

238 self.entityEditor.btnDelete.Enable()
239
240 def patternChanged(self, event=None):
241
242 if not self.entityEditor.checkEntitiesExist():
243 self.Close()
244 return
245
246 p = self.entityEditor.getActiveEntity()
247
248 if p is None:
249 return
250
251 # localization todo: unsure if these names are internal only or also displayed somewhere...
252 if p.rawName == "Uniform" or p.rawName == "Selected Ammo":
253 self.restrict()
254 else:
255 self.unrestrict()
256
257 self.block = True
258
259 for field in self.DAMAGE_TYPES:
260 edit = getattr(self, "%sEdit" % field)
261 amount = int(round(getattr(p, "%sAmount" % field)))
262 edit.ChangeValueFloat(amount)
263
264 self.block = False
265 self.OnFieldChanged()
266
267 def __del__(self):
268 pass

Callers 1

__init__Method · 0.95

Calls 6

restrictMethod · 0.95
unrestrictMethod · 0.95
OnFieldChangedMethod · 0.95
checkEntitiesExistMethod · 0.80
getActiveEntityMethod · 0.80
ChangeValueFloatMethod · 0.80

Tested by

no test coverage detected