(self, event)
| 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 | |
| 581 | class FitView(Display): |
nothing calls this directly
no test coverage detected