diff src/findwidget.cpp @ 557:57a7f95ef400 find

Make find widget behave as if text is cleared when it's closed, and restored when it's opened again
author Chris Cannam
date Thu, 23 Feb 2012 15:28:29 +0000
parents 04f18b2a32e8
children d932ce55c364
line wrap: on
line diff
--- a/src/findwidget.cpp	Thu Feb 23 11:44:50 2012 +0000
+++ b/src/findwidget.cpp	Thu Feb 23 15:28:29 2012 +0000
@@ -61,9 +61,15 @@
     if (m_lineEdit->isVisible()) {
 	m_lineEdit->hide();
 	button->setText(tr("Find..."));
+        if (m_lineEdit->text() != "") {
+            emit findTextChanged("");
+        }
     } else {
 	m_lineEdit->show();
 	button->setText(tr("Find:"));
+        if (m_lineEdit->text() != "") {
+            emit findTextChanged(m_lineEdit->text());
+        }
     }
 }