From 793459d97e7081a4f3db94357a55d74859571445 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Sat, 4 Oct 2008 21:55:49 +0200 Subject: [PATCH] this should fix a crash when the searchbar is about to be hidden --- src/qtui/chatviewsearchbar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qtui/chatviewsearchbar.cpp b/src/qtui/chatviewsearchbar.cpp index 250e277a..bfa79e1e 100644 --- a/src/qtui/chatviewsearchbar.cpp +++ b/src/qtui/chatviewsearchbar.cpp @@ -52,8 +52,11 @@ ChatViewSearchBar::ChatViewSearchBar(QWidget *parent) } void ChatViewSearchBar::setVisible(bool visible) { - QWidget::setVisible(visible); + // clearing the search field also removes the highlight items from the scene + // this should be done before the SearchBar is hidden, as the hiding triggers + // a resize event which can lead to strange side effects. ui.searchEditLine->clear(); + QWidget::setVisible(visible); if(visible) ui.searchEditLine->setFocus(); } -- 2.20.1