Opened 9 years ago

Last modified 7 years ago

#3706 assigned defect

OMEdit does not render some icons

Reported by: Rüdiger Franke Owned by: Adrian Pop
Priority: high Milestone: Future
Component: Interactive Environment Version: v1.9.4-dev-nightly
Keywords: Cc: Per Östlund

Description

OMEdit does not render all icons. Has this to do with recent optimizations?

Load e.g. Modelica_Synchronous (see github.com/Modelica)
Then open Modelica_Synchronous.Examples.RealSignals.Sample1

The icon of assignClock is not shown (see attached screenshot).

Attachments (1)

OMEditRedIcon.png (83.8 KB ) - added by Rüdiger Franke 9 years ago.

Download all attachments as: .zip

Change History (16)

by Rüdiger Franke, 9 years ago

Attachment: OMEditRedIcon.png added

comment:1 by Martin Sjölund, 9 years ago

If this is due to a missing class, I guess OMEdit could display a tooltip saying why the class is marked in red :)

comment:2 by Adrian Pop, 9 years ago

I think this might be some bug with the fact that Clock is a connector.

comment:3 by Adeel Asghar, 9 years ago

One reason is,

getIconAnnotation(Modelica_Synchronous.RealSignals.Sampler.AssignClock)
{annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, grid = {2, 2}, initialScale = 0.06), graphics = {Text(extent = {{-200, 100}, {200, 160}}, lineColor = {0, 0, 255}, textString = "%name"), Rectangle(extent = {{-90, 90}, {88, -88}}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, pattern = LinePattern.None), Line(points = {{-80, -60}, {-40, -60}, {-40, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 80}, {40, 80}, {40, 40}, {80, 40}, {80, 0}, {80, 0}, {80, 0}, {100, 0}}, color = {0, 0, 127}, pattern = LinePattern.Dot), Line(points = {{-80, -60}, {-80, 0}, {-106, 0}}, color = {0, 0, 127}, smooth = Smooth.None, pattern = LinePattern.Dot), Ellipse(extent = {{-90, -50}, {-70, -70}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-50, 10}, {-30, -10}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-10, 90}, {10, 70}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Ellipse(extent = {{30, 50}, {50, 30}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Ellipse(extent = {{70, 10}, {90, -10}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Line(visible = useClock, points = {{0, -100}, {0, 0}}, color = {175, 175, 175}, pattern = LinePattern.Dot, smooth = Smooth.None, thickness = 0.5)})) }

But this not a main issue, The main reason is,

getInheritedClasses(Modelica_Synchronous.ClockSignals.Interfaces.ClockInput)
{Clock}

Clock doesn't exist.

comment:4 by Adeel Asghar, 9 years ago

The getIconAnnotation fails because we have visible=useClock in annotation,

Line(visible=useClock,
          points={{0,-100},{0,0}},
          color={175,175,175},
          pattern=LinePattern.Dot,
          smooth=Smooth.None,
          thickness=0.5)

comment:5 by Adeel Asghar, 9 years ago

Cc: Per Östlund added
Component: OMEditInteractive Environment
Owner: changed from Adeel Asghar to Adrian Pop
Status: newassigned

comment:6 by Adrian Pop, 9 years ago

This is a bug in the library as "useClock" does not really exist in the model: Modelica_Synchronous.RealSignals.Sampler.AssignClock.
Maybe if we don't find a variable in the model we should return "false".

comment:7 by Adrian Pop, 9 years ago

I now created a ticket on Modelica Trac about this: #m:1919.

comment:8 by Adrian Pop, 9 years ago

The Modelica ticket has now been fixed but I don't know when the changes will propagate to our libraries (if so) as this is on the master branch:
https://github.com/modelica/Modelica_Synchronous/commit/65ac4a5988beca1e554823f7970e3a247ed6f15e

comment:9 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:10 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:11 by Dietmar Winkler, 8 years ago

I think this is the same issue as #3657

in reply to:  11 comment:12 by Adeel Asghar, 8 years ago

Replying to dietmarw:

I think this is the same issue as #3657

No it's not. See comment:7:ticket:3657.

comment:13 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:14 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:15 by Francesco Casella, 7 years ago

Milestone: 1.12.0Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

Note: See TracTickets for help on using tickets.