mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Tool for simple text search
This commit is contained in:
@ -93,6 +93,7 @@ void PDFAdvancedFindWidget::on_searchButton_clicked()
|
||||
}
|
||||
|
||||
m_findResults.clear();
|
||||
m_textSelection.dirty();
|
||||
updateResultsUI();
|
||||
|
||||
pdf::PDFAsynchronousTextLayoutCompiler* compiler = m_proxy->getTextLayoutCompiler();
|
||||
@ -173,7 +174,7 @@ void PDFAdvancedFindWidget::drawPage(QPainter* painter,
|
||||
|
||||
void PDFAdvancedFindWidget::performSearch()
|
||||
{
|
||||
if (m_parameters.isSearchFinished)
|
||||
if (m_parameters.isSearchFinished || m_parameters.phrase.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -269,6 +270,7 @@ pdf::PDFTextSelection PDFAdvancedFindWidget::getTextSelectionImpl() const
|
||||
|
||||
result.addItems(findResult.textSelectionItems, color);
|
||||
}
|
||||
result.build();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user