Fix: 补回 _on_point_changed 方法

This commit is contained in:
QQ 2026-07-06 22:41:32 +08:00
parent 426dbe191d
commit fc1da8974b
1 changed files with 17 additions and 0 deletions

17
main.py
View File

@ -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: