Replies: 3 comments 3 replies
-
Please open a PR with this new feature and mark it as WIP. This will allow to test possible merge conflicts and apply CI. Also there exits PR #1049 which changes some class members names. In general a new equation editor looks better than old one. The old component dialog was inherited from Qt3 which had no table cells editing feature and also would benefit from redesign. I did a quick test of the new editing system and found the following issues:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for these comments.
I have opened a PR but unfortunately seem to have messed up my attempt at squashing the old commits :( I will merge the changes in #1049 once it has been accepted.
This should be fixed in the latest commit.
I will fix these two shortly.
This is more tricky to address as EDD have both multiple properties and multiple equations. I think the real solution to this would be able to open an equation editor from a property table line (similar to Freecad's f(x) button in dimension edit boxes but with a wider editor if you've ever used that). I don't think that I will be able to manage that in this change.
Noted, we can pull out the syntax highlighting class into a separate file once complete and reuse it for the text editor. But again, I think that will be separate to this change. |
Beta Was this translation helpful? Give feedback.
-
PR #1054 opened and this discussion will now continue there. |
Beta Was this translation helpful? Give feedback.
-
I have refactored the component dialog box here: https://github.com/iwbnwif/qucs_s/tree/new_comp_dialog
The main aim of this change is to switch from editing equations by selecting them in a table and then typing in a separate field, to entering them using free text. At the moment the editing is very free(!) and it might be that it needs to be more constrained.
The main problem I started off trying to solve is when you accidentally overwrite an existing equation by clicking 'apply' instead of 'add'. I think that free text is an easier way of entering equations, especially longer lines that didn't fit completely in the edit box.
Some basic syntax highlighting is included for Ngspice keywords only. It would also be nice to detect some basic mistakes and underline them - but this is a future enhancement.
Any rows that do not include an equals '=' are ignored and will be lost. Maybe in future it would be nice to include comments?
This is quite a substantial change and although there are a few jobs still to do, I would welcome any feedback at this stage. I can only practically test the changes on Linux at the moment so bug reports from other platforms are welcome.
A second change is to edit component properties directly in the table rather than in a separate dialog. Again, I am sure there are some corner cases that I have missed.
I have constrained my changes to just two files. The rest of the simulation and drawing is unchanged.
Beta Was this translation helpful? Give feedback.
All reactions