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

Method displayFit

gui/esiFittings.py:555–578  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

553 tree.SortChildren(root)
554
555 def displayFit(self, event):
556 selection = self.fittingsTreeCtrl.GetSelection()
557 data = self.fittingsTreeCtrl.GetItemData(selection)
558
559 if data is None:
560 event.Skip()
561 return
562
563 fit = json.loads(data)
564 list = []
565
566 for item in fit['items']:
567 try:
568 cargo = Cargo(getItem(item['type_id']))
569 cargo.amount = item['quantity']
570 list.append(cargo)
571 except (KeyboardInterrupt, SystemExit):
572 raise
573 except Exception as e:
574 pyfalog.critical("Exception caught in displayFit")
575 pyfalog.critical(e)
576
577 self.parent.fitView.fitSelection = selection
578 self.parent.fitView.update(list)
579
580
581class FitView(Display):

Callers

nothing calls this directly

Calls 5

CargoClass · 0.90
getItemFunction · 0.90
GetSelectionMethod · 0.45
appendMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected