mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Books list: Preserve the horizontal scroll position when sorting by a column
This commit is contained in:
parent
a20d93bf0f
commit
0e6fd20950
@ -262,9 +262,11 @@ class BooksView(QTableView): # {{{
|
||||
self.selected_ids = [idc(r) for r in selected_rows]
|
||||
|
||||
def sorting_done(self, indexc):
|
||||
pos = self.horizontalScrollBar().value()
|
||||
self.select_rows(self.selected_ids, using_ids=True, change_current=True,
|
||||
scroll=True)
|
||||
self.selected_ids = []
|
||||
self.horizontalScrollBar().setValue(pos)
|
||||
|
||||
def sort_by_named_field(self, field, order, reset=True):
|
||||
if field in self.column_map:
|
||||
|
Loading…
x
Reference in New Issue
Block a user