Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Dec 28, 2024
1 parent 2d12df0 commit cc13b92
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 4 additions & 2 deletions py/LunaTranslator/gui/dialog_savedgame.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,10 @@ def movefocus(self, dx):
self.flow.verticalScrollBar().maximum()
)
else:
self.flow.ensureWidgetVisible(self.flow.widget(idx2))
try:
self.flow.ensureWidgetVisible(self.flow.widget(idx2))
except:
pass
try:
self.flow.widget(idx2).click()
except:
Expand All @@ -787,7 +790,6 @@ def moverank(self, dx):
game2 = self.idxsave[idx2]
self.idxsave.insert(idx2, self.idxsave.pop(idx1))
self.flow.switchidx(idx1, idx2)
# self.flow.ensureWidgetVisible(self.flow.widget(idx2))
idx1 = self.reflist.index(game)
idx2 = self.reflist.index(game2)
self.reflist.insert(idx2, self.reflist.pop(idx1))
Expand Down
14 changes: 10 additions & 4 deletions py/LunaTranslator/gui/dialog_savedgame_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,10 @@ def movefocus(self, dx):
self.stack.verticalScrollBar().maximum()
)
else:
self.stack.ensureWidgetVisible(group0.w(idx2))
try:
self.stack.ensureWidgetVisible(group0.w(idx2))
except:
pass
try:
group0.w(idx2).click()
except:
Expand Down Expand Up @@ -1012,9 +1015,12 @@ def moverank(self, dx):
)

self.stack.w(calculatetagidx(self.reftagid)).switchidx(idx1, idx2)
self.stack.ensureWidgetVisible(
self.stack.w(calculatetagidx(self.reftagid)).w(idx2)
)
try:
self.stack.ensureWidgetVisible(
self.stack.w(calculatetagidx(self.reftagid)).w(idx2)
)
except:
pass
idx1 = getreflist(self.reftagid).index(uid)
idx2 = getreflist(self.reftagid).index(uid2)
getreflist(self.reftagid).insert(idx2, getreflist(self.reftagid).pop(idx1))
Expand Down

0 comments on commit cc13b92

Please sign in to comment.