Skip to content
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

loadClassContentString should handle name collisions #11596

Closed
perost opened this issue Nov 17, 2023 · 0 comments · Fixed by #11613
Closed

loadClassContentString should handle name collisions #11596

perost opened this issue Nov 17, 2023 · 0 comments · Fixed by #11613
Assignees
Labels
COMP/GUI/InstBased Interface Issues with new instantiation-based OMEdit feature
Milestone

Comments

@perost
Copy link
Member

perost commented Nov 17, 2023

When adding elements to a class via loadClassContentString name collisions are currently ignored leading to invalid classes with duplicate elements. It should be possible to have loadClassContentString choose new names for element when there are already elements in the class with the same name.

@perost perost added the COMP/GUI/InstBased Interface Issues with new instantiation-based OMEdit feature label Nov 17, 2023
@perost perost self-assigned this Nov 17, 2023
perost added a commit to perost/OpenModelica that referenced this issue Nov 20, 2023
perost added a commit to perost/OpenModelica that referenced this issue Nov 20, 2023
@casella casella added this to the 1.23.0 milestone Nov 22, 2023
adeas31 added a commit that referenced this issue Nov 28, 2023
* fix OMSimulator PYTHONPATH in OMEdit (#11526)

* update subModule OMSimulator

* Check if we have a parameter modification or a binding (#11599)

Fixes #11595

* Do not use elided text for multiline string with fixed font size (#11610)

Fixes #8383

* Add loadClassContentString API (#11574)

* Rename conflicting elements in loadClassContentString (#11613)

Fixes #11596

* Added a tab widget at the bottom of MainWindow (#11627)

* Added a tab widget at the bottom of MainWindow

The tab widget mimics the Messages Browser. It is a shorter version of it.
Only shown when Messages Browser is hidden.
Messages Browser can now only be docked at the bottom.

Scroll to bottom when a new simulation output is added.

Fixes #9889

* Set the index to 0

* Fix the context menu for shapes (#11634)

This is a regression introduced in afb86a3

* Use the `loadClassContentString` API for cut, copy and paste (#11598)

Instead of using the OMEdit internal structures for pasting elements use `loadClassContentString` to merge.
Generate the Modelica code from the selected elements and then merge the code using `loadClassContentString`.
Put the data in the form of string and JSON on the clipboard. Use it when paste is called.

* Show the typed dimensions of array parameter in the dialog (#11629)

* Improve loadClassContentString (#11644)

- Traverse equations/algorithms manually when renaming instead of using
  the AbsynUtil traversal functions, since the traversal functions only
  traverses expressions and not crefs in e.g. connect equations.
- Rewrite the conflict handling to avoid generating new names that
  conflicts with the elements being added.

* Do not call show documentation when editing documentation

Fixes #11638
Calling show documentation while editing causes a recursion

* Do not push intermediate commands to stack

* Use QScrollArea for welcome page buttons

Fixes #10235

---------

Co-authored-by: arun3688 <rain100falls@gmail.com>
Co-authored-by: Per Östlund <per.ostlund@liu.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/GUI/InstBased Interface Issues with new instantiation-based OMEdit feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants