mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix cursor becoming invisible when completion popup is opened
This commit is contained in:
parent
127282840a
commit
20ce36517c
@ -257,6 +257,7 @@ class LineEdit(QLineEdit, LineEditECM):
|
||||
QLineEdit.__init__(self, parent)
|
||||
|
||||
self.sep = ','
|
||||
self.eat_focus_out = False
|
||||
self.space_before_sep = False
|
||||
self.add_separator = True
|
||||
self.original_cursor_pos = None
|
||||
@ -302,9 +303,15 @@ class LineEdit(QLineEdit, LineEditECM):
|
||||
if not self.mcompleter.model().current_items:
|
||||
self.mcompleter.hide()
|
||||
return
|
||||
self.eat_focus_out = True
|
||||
self.mcompleter.popup(select_first=select_first)
|
||||
self.mcompleter.scroll_to(orig)
|
||||
|
||||
def focusOutEvent(self, ev):
|
||||
if not self.eat_focus_out:
|
||||
QLineEdit.focusOutEvent(self, ev)
|
||||
self.eat_focus_out = False
|
||||
|
||||
def relayout(self):
|
||||
self.mcompleter.popup()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user