This commit is contained in:
恍兮惚兮 2024-09-14 19:55:45 +08:00
parent 5d93f01149
commit 4772048f51
2 changed files with 31 additions and 14 deletions

View File

@ -465,9 +465,9 @@ class TextBrowser(QWidget, dataget):
def _showyinyingtext2(self, color, iter_context_class, pos, text, font):
if iter_context_class not in self.iteryinyinglabelsave:
self.iteryinyinglabelsave[iter_context_class] = []
for label in self.iteryinyinglabelsave[iter_context_class]:
label.hide()
maxh = self.maxvisheight
subtext = []
subpos = []
@ -486,9 +486,26 @@ class TextBrowser(QWidget, dataget):
if text[i] != "\n":
subtext[-1] += text[i]
used = set()
collects = []
for i in range(len(subtext)):
finded = -1
for j in range(len(self.iteryinyinglabelsave[iter_context_class])):
if j in used:
continue
if (
self.iteryinyinglabelsave[iter_context_class][j].text()
== subtext[i]
):
finded = j
used.add(j)
break
if finded >= 0:
_ = self.iteryinyinglabelsave[iter_context_class][finded]
_.move(subpos[i].x(), subpos[i].y() + self.labeloffset_y)
_.show()
else:
if i >= len(self.iteryinyinglabelsave[iter_context_class]):
self.iteryinyinglabelsave[iter_context_class].append(
self.currentclass(self.toplabel2)

View File

@ -29,7 +29,7 @@ include(generate_product_version)
set(VERSION_MAJOR 5)
set(VERSION_MINOR 35)
set(VERSION_PATCH 5)
set(VERSION_PATCH 6)
add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h)