diff --git a/main.py b/main.py index ed1a1be..26ff12c 100644 --- a/main.py +++ b/main.py @@ -590,6 +590,23 @@ class MainWindow(QMainWindow): self.lbl_hint.setStyleSheet("color: #888; font-size: 11px;") self._update_display() + # ══════════════ 选点回调 ═════════════════════════════ + + def _on_point_changed(self, mode: str, pt: tuple) -> None: + x, y = int(round(pt[0])), int(round(pt[1])) + if mode == "o": + self.lbl_o.setText(f"({x}, {y})") + self.lbl_hint.setText("点击画面选 M") + elif mode == "m": + self.lbl_m.setText(f"({x}, {y})") + if not self._measuring: + self.lbl_hint.setText("点击画面选 M2,或点「开始测量」") + elif mode == "m2": + self.lbl_m2.setText(f"({x}, {y})") + self._update_display() + if self._measuring: + self._record_and_advance() + # ══════════════ 方向矫正 ═════════════════════════════ def _on_flip_toggled(self, checked: bool) -> None: