(self)
| 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.""" |
nothing calls this directly
no test coverage detected