(self, event)
| 122 | self.itemView.updateItems(True) |
| 123 | |
| 124 | def OnExport(self, event): |
| 125 | sMkt = Market.getInstance() |
| 126 | items = sMkt.getItemsWithOverrides() |
| 127 | defaultFile = "pyfa_overrides.csv" |
| 128 | |
| 129 | with wx.FileDialog( |
| 130 | self, _t("Save Overrides As..."), |
| 131 | wildcard=_t("pyfa overrides") + " (*.csv)|*.csv", |
| 132 | style=wx.FD_SAVE, |
| 133 | defaultFile=defaultFile |
| 134 | ) as dlg: |
| 135 | if dlg.ShowModal() == wx.ID_OK: |
| 136 | path = dlg.GetPath() |
| 137 | with open(path, 'w', encoding='utf-8') as csvfile: |
| 138 | writer = csv.writer(csvfile) |
| 139 | for item in items: |
| 140 | for key, override in item.overrides.items(): |
| 141 | writer.writerow([item.ID, override.attrID, override.value]) |
| 142 | |
| 143 | def OnClear(self, event): |
| 144 | with wx.MessageDialog( |
nothing calls this directly
no test coverage detected