mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Limit selection in completion popup to boxes containing less than completion_change_to_ascii_sorting items
This commit is contained in:
parent
1d9285df7a
commit
7b502b06f7
@ -168,12 +168,13 @@ class MultiCompleteComboBox(EnComboBox):
|
||||
v = unicode(c.currentCompletion())
|
||||
c.setCompletionPrefix('')
|
||||
c.complete()
|
||||
if c.model().rowCount() < tweaks['completion_change_to_ascii_sorting']:
|
||||
i = 0;
|
||||
while c.setCurrentRow(i):
|
||||
cr = unicode(c.currentIndex().data().toString())
|
||||
if cr.startswith(v):
|
||||
c.popup().setCurrentIndex(c.currentIndex())
|
||||
return
|
||||
break
|
||||
i += 1
|
||||
|
||||
def update_items_cache(self, complete_items):
|
||||
|
Loading…
x
Reference in New Issue
Block a user