Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Dec 27, 2024
1 parent f4bb5b6 commit 98df736
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion py/LunaTranslator/gui/inputdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ def __refresh(regist, line, combo: SuperCombo):
for comboname, refitems in cachehasref.items():

def refcombofunction(refitems, _i):
viss = []
for w, linwinfo in refitems:
vis = True
if linwinfo.get("refcombo_i") is not None:
Expand All @@ -699,7 +700,12 @@ def refcombofunction(refitems, _i):
vis = linwinfo.get("refcombo_i_r") != _i
elif linwinfo.get("refcombo_l") is not None:
vis = _i in linwinfo.get("refcombo_l")
formLayout.setRowVisible(w, vis)
if not vis:
formLayout.setRowVisible(w, False)
else:
viss.append(w)
for w in viss:
formLayout.setRowVisible(w, True)

cachecombo[comboname].currentIndexChanged.connect(
functools.partial(refcombofunction, refitems)
Expand Down

0 comments on commit 98df736

Please sign in to comment.