mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Scroll list of completion to current match when clicking combobox drop down arrow
This commit is contained in:
commit
024f2776b2
@ -165,8 +165,18 @@ class MultiCompleteComboBox(EnComboBox):
|
||||
|
||||
def showPopup(self):
|
||||
c = self.le._completer
|
||||
v = c.currentCompletion()
|
||||
c.setCompletionPrefix('')
|
||||
c.complete()
|
||||
cs = c.caseSensitivity()
|
||||
i = 0
|
||||
while c.setCurrentRow(i):
|
||||
cr = c.currentIndex().data().toString()
|
||||
if cr.startsWith(v, cs):
|
||||
c.popup().setCurrentIndex(c.currentIndex())
|
||||
return
|
||||
i += 1
|
||||
c.setCurrentRow(0)
|
||||
|
||||
def update_items_cache(self, complete_items):
|
||||
self.lineEdit().update_items_cache(complete_items)
|
||||
|
Loading…
x
Reference in New Issue
Block a user