mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
resort maximum_resort_levels tweak implemented
This commit is contained in:
parent
64f881f3a6
commit
6eaa75527b
@ -114,3 +114,10 @@ add_new_book_tags_when_importing_books = False
|
||||
# Set the maximum number of tags to show per book in the content server
|
||||
max_content_server_tags_shown=5
|
||||
|
||||
|
||||
# Set the maximum number of sort 'levels' that calibre will use to resort the
|
||||
# library after certain operations such as searches or device insertion. Each
|
||||
# sort level adds a performance penalty. If the database is large (thousands of
|
||||
# books) the penalty might be noticeable. If you are not concerned about multi-
|
||||
# level sorts, and if you are seeing a slowdown, reduce the value of this tweak.
|
||||
maximum_resort_levels = 5
|
@ -266,8 +266,8 @@ class BooksModel(QAbstractTableModel): # {{{
|
||||
self.db.refresh(field=None)
|
||||
self.resort(reset=reset)
|
||||
|
||||
def resort(self, reset=True, history=5): # Bug report needed history=4 :)
|
||||
for col,ord in reversed(self.sort_history[:history]):
|
||||
def resort(self, reset=True):
|
||||
for col,ord in reversed(self.sort_history[:tweaks['maximum_resort_levels']]):
|
||||
try:
|
||||
col = self.column_map.index(col)
|
||||
except ValueError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user