MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / changeEvent

Method changeEvent

SLiCAP/schematic/window.py:661–668  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

659 return None
660
661 def changeEvent(self, event):
662 # Re-establish this window's context when it becomes the active window:
663 # project/config and the symbol-metadata dicts are process-global, so the
664 # active editor must own them (keeps multiple open schematics consistent).
665 from PySide6.QtCore import QEvent
666 if event.type() == QEvent.ActivationChange and self.isActiveWindow():
667 self._activate_context()
668 super().changeEvent(event)
669
670 def _activate_context(self) -> None:
671 project.set_current(self._current_path)

Callers

nothing calls this directly

Calls 1

_activate_contextMethod · 0.95

Tested by

no test coverage detected