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

Method _browse

SLiCAP/schematic/image_dialog.py:87–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 # ── internal ──────────────────────────────────────────────────────────────
86
87 def _browse(self) -> None:
88 path, _ = QFileDialog.getOpenFileName(
89 self, "Select Image",
90 self._path_edit.text() or "",
91 _FILE_FILTER,
92 )
93 if path:
94 self._path_edit.setText(path)
95 self._load_natural_size(path)
96 # Reset scale to preference default for newly chosen file.
97 from .config import SCALE_IMAGE
98 self._scale_spin.setValue(SCALE_IMAGE)
99 self._update_size_labels()
100
101 def _load_natural_size(self, path: str) -> None:
102 """Read the file's natural pixel dimensions and store them."""

Callers

nothing calls this directly

Calls 3

_load_natural_sizeMethod · 0.95
_update_size_labelsMethod · 0.95
textMethod · 0.80

Tested by

no test coverage detected