Opened 5 years ago
Closed 4 years ago
#5841 closed defect (fixed)
Erroneous bounding rectangle and starting size of Diagram window size
Reported by: | massimo ceraolo | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | critical | Milestone: | 1.16.0 |
Component: | OMEdit | Version: | v1.16.0-dev |
Keywords: | Cc: |
Description (last modified by )
When showing, in Plotting Perspective, a diagram in the diagram window, OMEdit determines the diagram size in such a way that the bounding rectangle is visible.
Unfortunately, this bounding rectangle is not the rectangle as defined by the Extent annotation of the considered diagram, but, instead, the OMEdit default for new diagrams.
This obliges to do strange things to show what we want and to spoil some of the desktop space.
To show the issue Consider the enclosed windows.mo file, while using the standard defaults for Diagram View Extent: -100 -100, 100, 100.
This file contains two examples which, once displayed in the Diagram window, cannot be shown without white spaces above and below, whatever the size is manually given to the window.
Moreover, in case of Window1 model, if I choose a size that leaves the source and the resistor outside view, I cannot get to make them visible operating on the scrollbars (the scrollbar parameters seem to be incorrect).
So I propose that:
1) set the bounding rectangle of the diagram view so that its aspect ratio is equal to the actual Extent of the shown diagram.
2) choose the scrollbars in such a way that it is always possible to see all the diagram parts.
Later edit (16 Feb):
3) add the three zoom buttons (and the corresponding behaviour) available in the diagram perspective also in the Plot Perspective diagram view. ideally, they should be placed in the plot Header bar, to avoid space spoiling.
Attachments (2)
Change History (20)
comment:1 by , 5 years ago
by , 5 years ago
Attachment: | Windows.mo added |
---|
comment:3 by , 5 years ago
Replying to ceraolo:
Unfortunately, this bounding rectangle is not the rectangle as defined by the Extent annotation of the considered diagram, but, instead, the OMEdit default for new diagrams.
I'm not sure what you mean here. For example, Window1 has {{{extent = {{-180, -100}, {160, 100}} }}, and indeed I see a bounding rectangle which is wider than high.
To show the issue Consider the enclosed windows.mo file, while using the standard defaults for Diagram View Extent: -100 -100, 100, 100.
If I check Tools | Options | Graphical Views | Diagram View, I see that extent.
This file contains two examples which, once displayed in the Diagram window, cannot be shown without white spaces above and below, whatever the size is manually given to the window.
Do you mean gray space? I'm a bit confused.
Moreover, in case of Window1 model, if I choose a size that leaves the source and the resistor outside view, I cannot get to make them visible operating on the scrollbars (the scrollbar parameters seem to be incorrect).
I'm not sure what you mean here either. If I zoom in I only see one part of the diagram, but I can use the scroll bars to explore it.
I'm using Windows, are you perhaps on a Linux system using an old QT version? Can you attach some screen shot to demonstrate what you observe?
comment:4 by , 5 years ago
I'm going to attach a pdf with screenshots.
In reality, there is even more stuff to be fixed that listed the ticket's description if it is agreed upon that the bounding rectangle should be equal to the diagram Extent.
See the last two pictures in the enclosed pdf.
For the screenshots I used OM 1.16-dev 104 for Win, 64 bit. on a PC having standard dpi (i.e. 96 dpi).
by , 5 years ago
Attachment: | pictures.pdf added |
---|
comment:5 by , 5 years ago
Description: | modified (diff) |
---|
comment:6 by , 5 years ago
Priority: | high → critical |
---|
Sorry, I missed the "Plotting Perspective part", now it's clear :)
@adeas31, I guess we should handle the diagram exactly as in the Modeling part, probably the extent handling was not added there.
comment:7 by , 5 years ago
Description: | modified (diff) |
---|
comment:10 by , 5 years ago
It works like a charm!
You implemented my points 1 and 2.
What about also point 3? I mean to allow users to zoom also when in plotting perspective.
I proposed this because when in plotting perspective the available space for viewing the diagram is small, smaller the in Modelling perspective.
Therefore, it would be very useful to be able to zoom to the relevant part of the diagram so that to see details (and model names) so getting useful help in choosing the variables to plot.
Thanks again
comment:11 by , 5 years ago
I added the zoom ability now in bdb3bc6/OpenModelica.
Note that the zoom will reset once you switch between windows since OMEdit always redraw this window before showing it.
comment:12 by , 5 years ago
Thank you!
The usability of diagrams in the plotting perspective, for me, has improved a lot.
comment:13 by , 5 years ago
I understand that 1.15 beta is coming soon, and I plan to use 1.15 release for next academic year teaching.
May I ask you to back-port this ticket's fix to 1.15?
Thank you.
comment:14 by , 5 years ago
Milestone: | 1.16.0 → 1.15.0 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
comment:15 by , 5 years ago
comment:17 by , 4 years ago
Milestone: | 1.15.0 → 1.16.0 |
---|
Release 1.15.0 was scrapped, because replaceable support eventually turned out to be more easily implemented in 1.16.0. Hence, all 1.15.0 tickets are rescheduled to 1.16.0
comment:18 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This can be closed now. The fix will be part of 1.16 release.
@ceraolo, you forgot the attachment :)