Op Create Dialog improvement and Index ordering#102
Merged
Conversation
…ion bump Custom family Index is now absolute, allowing insertion between built-in families. Families with Index=-1 fill remaining slots alphabetically after all built-ins, ! skipping any positions claimed by explicitly-indexed families !
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.
Family Tab Ordering
The
Indexparameter is absolute — it refers to a slot in the full OP Createtab bar, which includes TD's built-in family tabs (COMP, TOP, CHOP, SOP, MAT, DAT).
Example
Assume TD has 6 built-in families at slots 0–5:
You install 4 custom families:
Result:
-1families are wildcards. They fill the first available slots afterall built-ins (starting at 6), skipping slot 7 which is claimed by
MyFX.MyFXatIndex=7is pinned within the wildcard group — one wildcard before it,two after.
Rules
sharing the same index are sorted alphabetically, all appearing before the
built-in at that slot (if any).
after all built-ins, alphabetically, skipping any slot claimed by an
explicit-index family.
Previous behavior (before this fix)
All
Index=-1families were assigned a sort position of999999, meaning theyall raced to the very end. An explicit-index family like
MyFXwithIndex=7ended up first among custom families — because 7 < 999999 — even though the
intent was for it to sit in the middle of the group.
With the same 4 families the result was:
MyFXwas placed before any wildcard family regardless of its requested slot,making explicit ordering within the custom group impossible.