this should fix a crash when the searchbar is about to be hidden
authorMarcus Eggenberger <egs@quassel-irc.org>
Sat, 4 Oct 2008 19:55:49 +0000 (21:55 +0200)
committerMarcus Eggenberger <egs@quassel-irc.org>
Sat, 4 Oct 2008 19:55:49 +0000 (21:55 +0200)
src/qtui/chatviewsearchbar.cpp

index 250e277..bfa79e1 100644 (file)
@@ -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();
 }