-
-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cpn): inputs and mixes must have source #5798
base: main
Are you sure you want to change the base?
Conversation
The solution is not as simple as I first thought. Just as in the firmware when an input or mix is added or edited, via the ui, the source cannot be none. So no issues should arise here. The issue mainly occurs when the Models and Settings are read that are not compatible with the current radio profile. Companion preserves the invalid lines to enable the user to manually fix them rather than have to create whole lines from scratch. This introduces the possibility for errors and requires extra effort. Checking and prompting when models are written would apply to Write Models and Settings to Radio, Simulate Radio, Simulate Model, Export Model, Save Models and Settings and Save As Models and Settings. Also we cannot just drop inputs and mixes with no source as any references to those dropped lines would also break. Therefore the references would need to be fixed creating more effort. Prompting when invalid lines are found and then if proceeding, dropping invalid lines and fixing references would be very annoying in situations say where the user is progressively converting models from one radio to another. Requiring the user to fix every model before activating any of the above features would not be acceptable. Alternatively users could open the incompatible Models and Settings, create a new Models and Settings file, then copy models one by one to the new file fixing as they go to avoid the prompts and dropped lines issues. A backward step from what they have now. Writing to etx files could remain unchanged, Write to Models and Settings to Radio could enforce fixing, however the biggest hurdle is Simulations. I'm unsure of the effort or complexity but only valid models can be simulated ie invalid ones would not show in radio simulator. If practical could also apply to Write Models and Settings to Radio. Thoughts? |
How about if any model in the list has invalid entries:
Basically disallow operations that would result in errors in either radio or simulator. Might also help if the invalid lines could be highlighted when editing the model. |
That might be okay for inputs and mixes due to the widget being used but not so easy for errors in other settings. I would favour a user instigated pop up dialog which lists all the errors and warnings. Add to context and model menus. |
This sort of workflow?
|
9f78e69
to
e637725
Compare
I have two ways of preventing invalid models being written or simulated.
Should the invalid/error colour be user selectable to cater for colour blind users? Feedback |
The latest commit takes the second option |
There is an issue with unsetting the model's errors flag after the errors are fixed and the edit dialog is closed. Update: Fixed |
Maybe a (permanent?) message/zone could be added to the status bar regarding validity of the model config? And you had to ask about configurable colour, didn't you... sounds like you want more work!🤣 And playing devils advocate, how well will that dialog scale if say there are a dozen models, and 2-3 issues with each? |
Would need to think about message/zone as maybe too small as the window is resizeable. Also the invalid models are coloured.
The dialog is for the currently selected model |
As it is possible to have multiple files open then the status would need to be displayed in each file window. I can see a situation where one or more errant models are not visible when there are many so it would not be obvious why functions are disabled. I'll see what I can do. |
Fixes #5793
Summary of changes: