-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add symbol editor #700
Merged
Merged
Add symbol editor #700
Commits on Apr 13, 2024
-
Add feature: saving symbol to file
"Schematic" object already can edit symbols, this commit makes it able to save and load them. Implementation is actually quite ugly in terms of code beauty and industry standards, it's very "hacky". It consists of two parts: 1. Teach "Save" and "Open" dialogs to deal with "*.sym" files 2. Modify "Schematic" object and some other parts of codebase so that when a schematic is saved and the filename ends with "*.sym", then only symbol parts are saved. And vice versa: when a file with a name ending in "*.sym" is opened, then skip the path for usual schematic, and load only symbol parts. The "symbol file" is actually a stripped "schematic file" — no properties, no components, etc.
Configuration menu - View commit details
-
Copy full SHA for f00c6ef - Browse repository at this point
Copy the full SHA f00c6efView commit details
Commits on Apr 19, 2024
-
Fix: show port numbers when editing *.sym file
- PortSymbol has two members: nameStr and numberStr. - nameStr is usually empty and is set from Schematic::adjustPortNumber after performing some obscure checks. - numberStr is usually contains a number - PortSymbol::paint outputs 'nameStr' as ports "label" - When editing a *.sym file, 'adjustPortNumber' is not called, nameStr remains empty This patch makes PortSymbol use 'numberStr' as fallback value for cases when 'nameStr' is empty. When editing a *.sym file one won't see a port without label anymore.
Configuration menu - View commit details
-
Copy full SHA for ca9d201 - Browse repository at this point
Copy the full SHA ca9d201View commit details
Commits on Apr 20, 2024
-
Allow inserting ports when editing a symbol
"Insert port" tool is reused it. When in symbol editing mode, left mouse button click with this tool activated spawns a dialog asking for port name, then insert a port. I hope there is no breaking changes and everything is backwards compatible as I strived to add workarounds everywhere it's needed. The sad part is that code is not elegant, it increases overall codebase entropy, doesn't follow any general strategy. It's just a set of patches.
Configuration menu - View commit details
-
Copy full SHA for 44eda49 - Browse repository at this point
Copy the full SHA 44eda49View commit details
Commits on Apr 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bfb9dc5 - Browse repository at this point
Copy the full SHA bfb9dc5View commit details -
Fix detached ports disappearing after undo in symbol edit mode
Detached ports are ports which were inserted manually, i.e. they don't have a corresponding port in schematic. Inside Schematic::undo the Schematic::adjustPortNumbers is called. The latter removes detached ports and because of that you lose all of your ports if use "undo" once. But Schematic::adjustPortNumbers is also called every time the editing mode is switched and when the file is saved. So I think it wouldn't be harm to not adjust port numbers every time you undoing.
Configuration menu - View commit details
-
Copy full SHA for 44d9b55 - Browse repository at this point
Copy the full SHA 44d9b55View commit details -
Configuration menu - View commit details
-
Copy full SHA for 483bd60 - Browse repository at this point
Copy the full SHA 483bd60View commit details
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.