1
0
Эх сурвалжийг харах

Small changes in text find

Kandrashin Denis 12 жил өмнө
parent
commit
b847178469
2 өөрчлөгдсөн 4 нэмэгдсэн , 3 устгасан
  1. 1 2
      fb2edit.pro
  2. 3 1
      source/fb2dlgs.cpp

+ 1 - 2
fb2edit.pro

@@ -65,5 +65,4 @@ if (unix) {
 }
 
 FORMS += \
-    source/fb2find.ui \
-    ../untitled.ui
+    source/fb2find.ui

+ 3 - 1
source/fb2dlgs.cpp

@@ -53,6 +53,7 @@ FbTextFindDlg::FbTextFindDlg(FbTextEdit &edit)
     , m_edit(edit)
 {
     ui->setupUi(this);
+    ui->checkHigh->hide();
     connect(ui->btnFind, SIGNAL(clicked()), this, SLOT(find()));
 }
 
@@ -69,8 +70,9 @@ void FbTextFindDlg::find()
     QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
     if (ui->radioUp->isChecked()) options |= QWebPage::FindBackward;
     if (ui->checkCase->isChecked()) options |= QWebPage::FindCaseSensitively;
-    if (ui->checkHigh->isChecked()) options |= QWebPage::HighlightAllOccurrences;
+    m_edit.findText(text, options);
 
+    options |= QWebPage::HighlightAllOccurrences;
     m_edit.findText(text, options);
 }