Find in Schematic Editor wrapping is slow and resets zoom
Description
When searching for something in the schematic editor, the system for wrapping back to the top of the search results is laggy and causes an unexpected change in the zoom.
The below screenshots demonstrate the change in viewport after the search results have been exhausted and the Find button is clicked again.
By comparison, the PCB Editor Find dialog does not have a wrap notice, just a count at the bottom and a wrap option. There is no lag when wrapping or change in viewport. Perhaps this is because the PCB is guaranteed to be a single file and it is easier to parse, but the two totally different Find dialogs still come off as strange to the end user.
Steps to reproduce
- Open helloworld in Schematic Editor
- Zoom way in, so that the view matches the screenshot above
- Open Find dialog
- Search for "hello"
- Press Find to select the "hello world" item
- Press Find again to select the "hello devs" item
- Press Find again to get an "end of schematic" popup on the schematic canvas.
- Press Find again to wrap to beginning, but note that there is a noticeable lag before the "hello world" item is selected again (and a totally different view is shown)
KiCad Version
Application: KiCad Schematic Editor x86_64 on x86_64
Version: 7.0.1-0, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 5.3.1
FontConfig 2.14.0
libcurl/7.86.0 SecureTransport (LibreSSL/3.3.6) zlib/1.2.11 nghttp2/1.47.0
Platform: macOS Ventura Version 13.2.1 (Build 22D68), 64 bit, Little endian, wxMac
Build Info:
Date: Mar 11 2023 12:55:46
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.3
Curl: 7.77.0
ngspice: 38
Compiler: Clang 13.0.0 with C++ ABI 1002
Build settings:
KICAD_SPICE=ON