Don't call setCurrentRow if row didn't change

This commit is contained in:
Alexander Presnyakov 2020-07-13 12:33:36 +03:00
parent e092dadc9a
commit 364725a528

View file

@ -92,8 +92,9 @@ class StudyDeck(QDialog):
if rows_count: if rows_count:
new_row %= rows_count # don't let row index overflow/underflow new_row %= rows_count # don't let row index overflow/underflow
self.form.list.setCurrentRow(new_row) if new_row != current_row:
return new_row != current_row self.form.list.setCurrentRow(new_row)
return True
return False return False
def redraw(self, filt, focus=None): def redraw(self, filt, focus=None):