Skip to content

Conversation

supersaiyansubtlety
Copy link
Member

Fixes #256 by re-setting NavigatorPanel's entries instead of re-adding them in EditorPanel::setSource.

NavigatorPanel gets refreshed twice when mapping are reloaded: once before mappings are loaded and once after.
Before, when entries were re-added, they'd be skipped if they were already contained by the navigator; since the navigator contained the entries after the un-mapped refresh, they wouldn't be added for the mapped refresh.

The old conditional adding could also result in an entry being in the navigator multiple times due to type changes.

Also:

  • fixes a bug that caused entries to get out-of-order when changing their types
  • fixes navigator label index padding so the index part always has the same (String) length as the total part
    • before you could end up with "00/0" because it just ensured the index had at least two digits
    • now you get "0/0" and "01/23" which ensures fixed length

@supersaiyansubtlety supersaiyansubtlety self-assigned this Sep 26, 2025
@supersaiyansubtlety supersaiyansubtlety added bug Something isn't working user interface affects the enigma ui labels Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user interface affects the enigma ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigator count doesn't update properly when reloading mappings
1 participant