Close instead of hide auto-complete menu when inactive (#2386)
This commit is contained in:
@@ -1090,11 +1090,14 @@ class GuiDocEditor(QPlainTextEdit):
|
|||||||
show = self._completer.updateMetaText(text, bPos)
|
show = self._completer.updateMetaText(text, bPos)
|
||||||
else:
|
else:
|
||||||
show = self._completer.updateCommentText(text, bPos)
|
show = self._completer.updateCommentText(text, bPos)
|
||||||
point = self.cursorRect().bottomRight()
|
if show:
|
||||||
self._completer.move(viewport.mapToGlobal(point))
|
point = self.cursorRect().bottomRight()
|
||||||
self._completer.setVisible(show)
|
self._completer.move(viewport.mapToGlobal(point))
|
||||||
|
self._completer.show()
|
||||||
|
else:
|
||||||
|
self._completer.close()
|
||||||
else:
|
else:
|
||||||
self._completer.setVisible(False)
|
self._completer.close()
|
||||||
|
|
||||||
if self._doReplace and added == 1:
|
if self._doReplace and added == 1:
|
||||||
cursor = self.textCursor()
|
cursor = self.textCursor()
|
||||||
|
|||||||
Reference in New Issue
Block a user