(self, callingWindow, srcContext, mainItem, selection)
| 19 | self.mainFrame = gui.mainFrame.MainFrame.getInstance() |
| 20 | |
| 21 | def display(self, callingWindow, srcContext, mainItem, selection): |
| 22 | if self.mainFrame.getActiveFit() is None or srcContext not in ( |
| 23 | 'fittingModule', |
| 24 | 'droneItem', |
| 25 | 'fighterItem', |
| 26 | 'boosterItem', |
| 27 | 'implantItem', |
| 28 | 'cargoItem', |
| 29 | 'projectedModule', |
| 30 | 'projectedDrone', |
| 31 | 'projectedFighter' |
| 32 | ): |
| 33 | return False |
| 34 | |
| 35 | if mainItem is None or getattr(mainItem, 'isEmpty', False): |
| 36 | return False |
| 37 | |
| 38 | self.mainVariations = Market.getInstance().getVariationsByItems((mainItem.item,)) |
| 39 | # No variations from current module |
| 40 | if len(self.mainVariations) < 2: |
| 41 | return False |
| 42 | |
| 43 | self.mainItem = mainItem |
| 44 | self.selection = selection |
| 45 | self.srcContext = srcContext |
| 46 | return True |
| 47 | |
| 48 | def getText(self, callingWindow, itmContext, mainItem, selection): |
| 49 | return _t('Variations') |
nothing calls this directly
no test coverage detected