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

Method importPatterns

gui/patternEditor.py:270–290  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

268 pass
269
270 def importPatterns(self, event):
271 text = fromClipboard()
272 if text:
273 sDP = DamagePattern.getInstance()
274 try:
275 sDP.importPatterns(text)
276 self.stNotice.SetLabel(_t("Patterns successfully imported from clipboard"))
277 except ImportError as e:
278 pyfalog.error(e)
279 self.stNotice.SetLabel(str(e))
280 except (KeyboardInterrupt, SystemExit):
281 raise
282 except Exception as e:
283 msg = _t("Could not import from clipboard: unknown errors")
284 pyfalog.warning(msg)
285 pyfalog.error(e)
286 self.stNotice.SetLabel(msg)
287 finally:
288 self.entityEditor.refreshEntityList()
289 else:
290 self.stNotice.SetLabel(_t("Could not import from clipboard"))
291
292 def exportPatterns(self, event):
293 sDP = DamagePattern.getInstance()

Callers

nothing calls this directly

Calls 5

fromClipboardFunction · 0.90
SetLabelMethod · 0.80
refreshEntityListMethod · 0.80
_tFunction · 0.50
getInstanceMethod · 0.45

Tested by

no test coverage detected