Repository navigation
Search the X-Plane Custom Scenery list - #65
Merged
flysimdev merged 2 commits intoNov 28, 2026
Merged
Conversation
The list can be well over a thousand packages long. A search box under
the file line shows only the packages whose name or folder contains the
text (case and / or \ do not matter), with the count on the right
("3 of 1,623 packages"). Esc empties it; it stays while the list is read
again.
While searching, rows cannot be dragged: hundreds of hidden rows may lie
between two shown ones, so where a drop lands would be a guess. The
switches still work. "Show in list" on a row clears the search, scrolls
to the package and marks it with an accent border, ready to drag.
SceneryPackSearch holds the matching and the count text; the page shows
a filtered view of Rows, so the list itself and the drop indices are
unchanged.
A "Finding a package" section on the search, the count and Show in list, a new screenshot of a search, and the page's screenshot retaken with the search box.
andrewcarlberg
marked this pull request as ready for review
November 26, 2026 00:35
Owner
|
@andrewcarlberg Blue skies |
Owner
|
@andrewcarlberg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
The X-Plane Custom Scenery page lists every line of
scenery_packs.ini. Mine has 1,623, so finding one package meant a lot of scrolling. This adds a search box under the "From …scenery_packs.ini" line:/and\count as the same, soD:/ortho4xpfindsD:\Ortho4XP\…. It uses the same box, icon and 250 ms typing delay as the Airports page.The intro text of the page is unchanged.
Screenshots
Before (the page as it is in 1.6.0):
After: the search box and count:
After: searching
kden. 3 of 1,623 match, dragging is paused, and each row has Show in list:After: Show in list on Z KDEN Mesh. The search is cleared, the list is scrolled to it, and it's marked:
How it's built
Gui/Scenery/SceneryPackSearch.cs(new): the matching and the count text. It's small and doesn't depend on WPF, so it's easy to test.SceneryViewModel: aSearchproperty and a filteredICollectionViewoverRows.Rowsitself, and so the indicesDropuses, never changes.CanDrag=CanEditand no search;Dropchecks it too.ShowInList(row)clears the search and highlights the row.SceneryPackRow:IsHighlighted.SceneryView: the search box, the count and note, the Show in list button, and the scroll to the found row. The Esc handler lives in the code-behind, because aKeyBindingon theTextBoxdidn't clear it reliably.Tests
dotnet buildhas 0 warnings, anddotnet testgives 689 passed, 0 failed, 0 skipped (26 new).SceneryPackSearchTests(15): blank searches, case and spaces,/and\in paths, X-Plane's own entries such as*GLOBAL_AIRPORTS*, no match, the count texts, and the count under a German culture.SceneryViewModelTests(11), against a temporaryscenery_packs.ini:Checked by hand in the app with my 1,623-package list:
Docs
docs/custom-scenery.mdhas a new Finding a package section with a new screenshot (images/custom-scenery-search.png), andimages/custom-scenery.pngis retaken with the search box.images/custom-scenery-running.pngstill shows the page without the search box. Retaking it means starting a mount, so I left it. Happy to update it if you'd like.