Repository navigation
Conversation
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.
Description
Closes #113.
This adds an "i" icon to the right of the model file browser. Hovering over it shows the gear make, gear model and "modeled by" fields from the .nam metadata, one per line, with "(Unknown)" for any field that's missing. The icon is hidden while no model is loaded.
Some details:
_StageModelthrough theget_dspoverload that returnsdspData, as in Use model metadata name in browser #658. Each field is type-checked before it's read, since ajson::type_errorwouldn't be caught by the existingcatch (std::runtime_error&).UpdateTooltips()runs whenever the icon is shown or hidden, because macOS only registers tooltip regions for controls that were visible when the window opened. I've only been able to test on Windows.gear_makeandgear_modelusually hold the same text, so the name often appears twice. I can merge them into one line if you'd prefer.PR Checklist
format.bash? I ran clang-format on the changed files only, since running it on the whole repo also touched unrelated lines with my clang-format version.