Commit 7e75e9b8 authored by Shawn Rutledge's avatar Shawn Rutledge
Browse files

PdfMultiPageView: update search highlights when results change


In the single-page view, we bind to the PdfSearchModel.currentPageBoundingPolygons
property, which is convenient because it has a changed signal, so it
stays updated in all cases: when the user changes the search string,
when a different document is loaded, or when changing the current page.

In the multi-page view, we need to invoke a function to get the search
results on each page, because results are different on each page, and we
often need to show multiple pages at the same time.  The challenge then
is how to ensure that it gets re-evaluated often enough.  It requires
connecting to more than one signal; but there isn't any way to "kick" a
binding when some signal occurs, so the solution isn't very declarative,
unfortunately.

Change-Id: I72e7dad01b8cb6c43abcccf4fa46e443409b39e0
Reviewed-by: default avatarShawn Rutledge <shawn.rutledge@qt.io>
parent 82674435
Showing with 13 additions and 1 deletion
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment