Skip to content

Commit ea1f83b

Browse files
committed
ComboBoxSearch: Do nothing on showPopup calles if popup already visible
1 parent e650fe7 commit ea1f83b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Orange/widgets/utils/combobox.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ def showPopup(self):
6767
The .popup(), .lineEdit(), .completer() of the base class are not used.
6868
"""
6969
if self.__popup is not None:
70-
popup = self.__popup
71-
self.__popup = self.__proxy = None
72-
popup.hide()
73-
popup.deleteLater()
70+
# We have user entered state that cannot be disturbed
71+
# (entered filter text, scroll offset, ...)
72+
return # pragma: no cover
7473

7574
if self.count() == 0:
7675
return
@@ -170,7 +169,7 @@ def hidePopup(self):
170169
popup.deleteLater()
171170

172171
# need to call base hidePopup even though the base showPopup was not
173-
# called (update internal state wrt. 'pressed' arrow, ...
172+
# called (update internal state wrt. 'pressed' arrow, ...)
174173
super().hidePopup()
175174
self.__searchline.hide()
176175
self.update()

0 commit comments

Comments
 (0)