Opened 9 years ago
Last modified 4 years ago
#4215 reopened defect
Cannot access connectors within icon graphics or nested models
| Reported by: | Rüdiger Franke | Owned by: | Adeel Asghar |
|---|---|---|---|
| Priority: | critical | Milestone: | |
| Component: | OMEdit | Version: | |
| Keywords: | Cc: |
Description
Some models place connectors or whole models within the icon graphics. OMEdit does not give access to them, making it impossible to use the models graphically.
See for example:
Modelica.Blocks.Examples.InverseModel: it is impossible to use the connectors offirstOrder1with the mouse or to open the parameter dialog offirstOrder1(OMEdit only activates the surrounding inverseBlockConstraints).-
Modelica_Synchronous.Examples.Systems.ControlledMixingUnit: same behavior forinvMixingUnit-- just more interesting example
Moreover OMEdit renders the connector y2 of Modelica.Blocks.Math.InverseBlockConstraints at a wrong place.
Change History (12)
comment:1 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 by , 9 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
It is now possible to draw connection lines. Thank you for the fast reply!
It is not possible to select nested models though, e.g. to:
- open the parameter dialog of
firstOrder1inModelica.Blocks.Examples.InverseModel, - delete a connection,
- move nested models around
comment:3 by , 9 years ago
This will never fix at least with the current design. How do you expect to open the parameters dialog of firstOrder1 if it is not getting the mouse events. firstOrder1 is stacked under inverseBlockConstraints so all the mouse events go to inverseBlockConstraints and firstOrder1 never get selected.
We are using the basic Qt selection mechanism i.e., select using the bounding rectangle (Wolfram SystemModeler is also doing exactly as what we do). I guess Dymola has implemented some special selection mechanism.
comment:4 by , 9 years ago
In Dymola the bounding rectangle only works if the icon is filled, e.g. with white color. Otherwise you must move the mouse over a specific graphical element of the icon, like the surrounding rectangle of InverseBlockConstraint.
comment:5 by , 9 years ago
Yes, I know that. And I have same functionality for shapes e.g., draw an ellipse and then draw an rectangle on top of it. You can select both ellipse and rectangle as long as the rectangle is not filled.
AFAIR there were some issues when I tried to implement it for components. I will try again and will see if I can fix it.
comment:6 by , 9 years ago
| Milestone: | 1.11.0 → 1.12.0 |
|---|
Milestone changed to 1.12.0 since 1.11.0 was released.
comment:7 by , 8 years ago
| Milestone: | 1.12.0 → 1.13.0 |
|---|
comment:9 by , 6 years ago
| Milestone: | 1.14.0 → 1.16.0 |
|---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:11 by , 5 years ago
| Milestone: | 1.17.0 → 1.18.0 |
|---|
Retargeted to 1.18.0 because of 1.17.0 timed release.

Both the examples doesn't have models that place connectors within the icon graphics. For example, if we look at
Modelica.Blocks.Examples.InverseModelit has two componentfirstOrder1andinverseBlockConstraints. The problem isfirstOrder1is stacked underinverseBlockConstraints(note that its not one component, its two components placed on same position.)So the general case for stacked components is the top component gets all the mouse events which is
inverseBlockConstraintsin this example. That is why its not possible to use the connectors offirstOrder1.One idea is to provide ordering of the components so users can choose which one should be on top or at bottom.
However, I updated the code to allow making connections from the component even if it is under some shape/component. Note that if you have two connectors at same position then the top one is always used. This is done in bb5a910/OMEdit.
The other problem where connector is rendered at wrong place is fixed in 8054050/OMEdit.