tcobbs / ldview

Real-time 3D viewer for displaying LDraw models
https://tcobbs.github.io/ldview/
GNU General Public License v2.0
87 stars 17 forks source link

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

Closed tcobbs closed 2 years ago

tcobbs commented 2 years ago

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):

tcobbs commented 2 years ago

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

tcobbs commented 2 years ago

Windows fix: https://github.com/tcobbs/ldview/commit/a0ce8c3275d9488f48e58ec1b917e789d2dcb8cb

pbartfai commented 2 years ago

Qt fix: 12c581f54f86ac294437aa44fe8aa15639627306