From: Marcus Eggenberger Date: Sat, 4 Oct 2008 19:55:49 +0000 (+0200) Subject: this should fix a crash when the searchbar is about to be hidden X-Git-Tag: 0.3.1~206 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=793459d97e7081a4f3db94357a55d74859571445 this should fix a crash when the searchbar is about to be hidden --- 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(); }