Re-check favourites status on any text change

Updates the favourites button when the search text is updated programmatically as well as user input. Fixes a bug where using the recent search drop-down doesn't update the favourites button state correctly.
This commit is contained in:
Houssam Salem 2014-05-27 07:04:10 +10:00
parent 7b62094ea0
commit 7fa346c2a2

View File

@ -1763,7 +1763,7 @@ class FavouritesLineEdit(QLineEdit):
# name of current saved filter (if query matches) # name of current saved filter (if query matches)
self.name = None self.name = None
self.buttonClicked.connect(self.onClicked) self.buttonClicked.connect(self.onClicked)
self.connect(self, SIGNAL("textEdited(QString)"), self.updateButton) self.connect(self, SIGNAL("textChanged(QString)"), self.updateButton)
def resizeEvent(self, event): def resizeEvent(self, event):
buttonSize = self.button.sizeHint() buttonSize = self.button.sizeHint()