Opened 8 years ago

Last modified 3 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 of firstOrder1 with the mouse or to open the parameter dialog of firstOrder1 (OMEdit only activates the surrounding inverseBlockConstraints).
  • Modelica_Synchronous.Examples.Systems.ControlledMixingUnit: same behavior for invMixingUnit -- 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 Adeel Asghar, 8 years ago

Resolution: fixed
Status: newclosed

Both the examples doesn't have models that place connectors within the icon graphics. For example, if we look at Modelica.Blocks.Examples.InverseModel it has two component firstOrder1 and inverseBlockConstraints. The problem is firstOrder1 is stacked under inverseBlockConstraints (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 inverseBlockConstraints in this example. That is why its not possible to use the connectors of firstOrder1.

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.

comment:2 by Rüdiger Franke, 8 years ago

Resolution: fixed
Status: closedreopened

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 firstOrder1 in Modelica.Blocks.Examples.InverseModel,
  • delete a connection,
  • move nested models around

comment:3 by Adeel Asghar, 8 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 Rüdiger Franke, 8 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 Adeel Asghar, 8 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 Adeel Asghar, 8 years ago

Milestone: 1.11.01.12.0

Milestone changed to 1.12.0 since 1.11.0 was released.

comment:7 by Adeel Asghar, 7 years ago

Milestone: 1.12.01.13.0

comment:8 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:9 by Francesco Casella, 5 years ago

Milestone: 1.14.01.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:10 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:11 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:12 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.