Clear Cheatsheet results when filter text empty

This commit is contained in:
Curtis Gedak 2018-08-13 13:24:23 -06:00
parent 713528a239
commit 378f03c0b6

View file

@ -71,6 +71,8 @@ class cheatSheet(QWidget, Ui_cheatSheet):
def textChanged(self, text):
if not text:
self.hideList()
self.list.clear()
self.view.setText("")
else:
self.list.show()
@ -146,7 +148,7 @@ class cheatSheet(QWidget, Ui_cheatSheet):
def showInfos(self):
self.hideList()
if self.list:
if self.list and len(self.txtFilter.text()) != 0:
i = self.list.currentItem()
ref = i.data(Qt.UserRole)
if ref: