mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
24ea3c4327
commit
ec8b8bbe69
@ -221,7 +221,12 @@ class Matches(QAbstractItemModel):
|
|||||||
self.reset()
|
self.reset()
|
||||||
|
|
||||||
def reorder_matches(self):
|
def reorder_matches(self):
|
||||||
self.matches = sorted(self.matches, key=lambda x: self.all_matches.index(x))
|
def keygen(x):
|
||||||
|
try:
|
||||||
|
return self.all_matches.index(x)
|
||||||
|
except:
|
||||||
|
return 100000
|
||||||
|
self.matches = sorted(self.matches, key=keygen)
|
||||||
|
|
||||||
|
|
||||||
class SearchFilter(SearchQueryParser):
|
class SearchFilter(SearchQueryParser):
|
||||||
@ -327,5 +332,6 @@ class SearchFilter(SearchQueryParser):
|
|||||||
matches.add(sr)
|
matches.add(sr)
|
||||||
break
|
break
|
||||||
except ValueError: # Unicode errors
|
except ValueError: # Unicode errors
|
||||||
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return matches
|
return matches
|
||||||
|
Loading…
x
Reference in New Issue
Block a user