This commit is contained in:
恍兮惚兮 2024-12-29 00:05:12 +08:00
parent 2d12df0388
commit cc13b92d27
2 changed files with 14 additions and 6 deletions

View File

@ -773,7 +773,10 @@ class dialog_savedgame_new(QWidget):
self.flow.verticalScrollBar().maximum() self.flow.verticalScrollBar().maximum()
) )
else: else:
self.flow.ensureWidgetVisible(self.flow.widget(idx2)) try:
self.flow.ensureWidgetVisible(self.flow.widget(idx2))
except:
pass
try: try:
self.flow.widget(idx2).click() self.flow.widget(idx2).click()
except: except:
@ -787,7 +790,6 @@ class dialog_savedgame_new(QWidget):
game2 = self.idxsave[idx2] game2 = self.idxsave[idx2]
self.idxsave.insert(idx2, self.idxsave.pop(idx1)) self.idxsave.insert(idx2, self.idxsave.pop(idx1))
self.flow.switchidx(idx1, idx2) self.flow.switchidx(idx1, idx2)
# self.flow.ensureWidgetVisible(self.flow.widget(idx2))
idx1 = self.reflist.index(game) idx1 = self.reflist.index(game)
idx2 = self.reflist.index(game2) idx2 = self.reflist.index(game2)
self.reflist.insert(idx2, self.reflist.pop(idx1)) self.reflist.insert(idx2, self.reflist.pop(idx1))

View File

@ -778,7 +778,10 @@ class dialog_savedgame_v3(QWidget):
self.stack.verticalScrollBar().maximum() self.stack.verticalScrollBar().maximum()
) )
else: else:
self.stack.ensureWidgetVisible(group0.w(idx2)) try:
self.stack.ensureWidgetVisible(group0.w(idx2))
except:
pass
try: try:
group0.w(idx2).click() group0.w(idx2).click()
except: except:
@ -1012,9 +1015,12 @@ class dialog_savedgame_v3(QWidget):
) )
self.stack.w(calculatetagidx(self.reftagid)).switchidx(idx1, idx2) self.stack.w(calculatetagidx(self.reftagid)).switchidx(idx1, idx2)
self.stack.ensureWidgetVisible( try:
self.stack.w(calculatetagidx(self.reftagid)).w(idx2) self.stack.ensureWidgetVisible(
) self.stack.w(calculatetagidx(self.reftagid)).w(idx2)
)
except:
pass
idx1 = getreflist(self.reftagid).index(uid) idx1 = getreflist(self.reftagid).index(uid)
idx2 = getreflist(self.reftagid).index(uid2) idx2 = getreflist(self.reftagid).index(uid2)
getreflist(self.reftagid).insert(idx2, getreflist(self.reftagid).pop(idx1)) getreflist(self.reftagid).insert(idx2, getreflist(self.reftagid).pop(idx1))