(self, mod)
| 71 | fittingView.refresh = refresh |
| 72 | |
| 73 | def getText(self, mod): |
| 74 | if hasattr(mod, "item"): |
| 75 | attr = mod.getModifiedItemAttr(self.info.name, None) |
| 76 | else: |
| 77 | if self.direct: |
| 78 | info = self.directInfo |
| 79 | attr = info.get(mod.ID, "") if info else "" |
| 80 | else: |
| 81 | attr = mod.getAttribute(self.info.name) |
| 82 | |
| 83 | if not attr: |
| 84 | return "" |
| 85 | |
| 86 | if self.info.name == "volume": |
| 87 | if getattr(mod, "amount", 1) != 1: |
| 88 | attr = "{} m\u00B3 ({} m\u00B3)".format( |
| 89 | formatAmount(attr, 3, 0, 6), |
| 90 | formatAmount(attr * mod.amount, 3, 0, 6)) |
| 91 | else: |
| 92 | attr = "{} m\u00B3".format(formatAmount(attr, 3, 0, 6)) |
| 93 | if isinstance(attr, (float, int)): |
| 94 | attr = (formatAmount(attr, 3, 0, 3)) |
| 95 | |
| 96 | return attr |
| 97 | |
| 98 | def getImageId(self, mod): |
| 99 | return -1 |
nothing calls this directly
no test coverage detected