From fc1da8974bf6c21b3fda7af75ff26366d1da2aa2 Mon Sep 17 00:00:00 2001 From: newbieQQ Date: Mon, 6 Jul 2026 22:41:32 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E8=A1=A5=E5=9B=9E=20=5Fon=5Fpoint=5Fcha?= =?UTF-8?q?nged=20=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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: