tcobbs/ldview

Search doesn't continue from current selection in Qt and Windows versions

Closed this issue · 3 comments

Describe the bug
Note: Qt and Windows versions only.
When performing a search in the Model Tree, hitting the next button should start the search from the currently selected row in the tree view, not from the last match.

To Reproduce
Steps to reproduce the behavior:

  1. Open a model in the Qt version of LDView.
  2. Show the Model Tree Dialog
  3. Enter the part number of an LDraw part that is used multiple times in the LDraw file in the search box.
  4. Once the match selects a line in the UI, select the next line.
  5. Hit the button to find the next match.
  6. The search jumps back up and matches the part number inside the part itself (which is the next match after the first one, but not the next match after the current selection).

Expected behavior
The search should pick up from whatever line in the tree view is currently selected.

Platform (please complete the following information):

  • OS: Fedora Workstation & Windows
  • Version: 36 & 11
  • CPU Architecture: X86-64

This only happens in Windows if "Highlight selected line" is unchecked. The same may or may not be true in the Qt version.

Windows fix: a0ce8c3

Qt fix: 12c581f