From 64d31d01daa2170d36389776dbdd7d8459873fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Fri, 22 Nov 2024 21:04:01 +0800 Subject: [PATCH] . --- cpp/version.cmake | 2 +- py/LunaTranslator/rendertext/textbrowser.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/version.cmake b/cpp/version.cmake index d0eda942..cfb625a4 100644 --- a/cpp/version.cmake +++ b/cpp/version.cmake @@ -1,7 +1,7 @@ set(VERSION_MAJOR 6) set(VERSION_MINOR 5) -set(VERSION_PATCH 5) +set(VERSION_PATCH 6) set(VERSION_REVISION 0) set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}") add_library(VERSION_DEF INTERFACE) diff --git a/py/LunaTranslator/rendertext/textbrowser.py b/py/LunaTranslator/rendertext/textbrowser.py index b771d439..3febb269 100644 --- a/py/LunaTranslator/rendertext/textbrowser.py +++ b/py/LunaTranslator/rendertext/textbrowser.py @@ -723,9 +723,9 @@ class TextBrowser(QWidget, dataget): _ = self.solvejiaminglabel( savetaglabels_idx, word, fonthira, fontori_m, tl1, fha ) - lines[-1].append(_) - if tl1.y() != tl2.y(): + if len(lines[-1]) and (_.y() != lines[-1][-1].y()): lines.append([]) + lines[-1].append(_) savetaglabels_idx += 1 for line in lines: self._dyna_merge_label(line)