MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _window_showing

Method _window_showing

SLiCAP/schematic/window.py:650–659  ·  view source on GitHub ↗

A visible MainWindow currently editing ``path``, or None.

(path: Path)

Source from the content-addressed store, hash-verified

648
649 @staticmethod
650 def _window_showing(path: Path) -> "MainWindow | None":
651 """A visible MainWindow currently editing ``path``, or None."""
652 from PySide6.QtWidgets import QApplication
653 target = Path(path).resolve()
654 for w in QApplication.topLevelWidgets():
655 if (isinstance(w, MainWindow) and w.isVisible()
656 and w._current_path is not None
657 and Path(w._current_path).resolve() == target):
658 return w
659 return None
660
661 def changeEvent(self, event):
662 # Re-establish this window's context when it becomes the active window:

Callers 1

open_subschematicMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected