Opened 6 years ago
Closed 6 years ago
#5343 closed defect (fixed)
Duplicate of read only model is also read only (but shouldn't)
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | high | Milestone: | 1.14.0 |
Component: | OMEdit | Version: | v1.14.0-dev-nightly |
Keywords: | Cc: | Andrea Bartolini, Martin Sjölund |
Description
If I load any system library in OpenModelica, then the library is marked as read only. If I make a copy of any model to be treated as a new separate model, then the model is also marked as read only -- which does not make sense.
Reproducible example:
- Open Modelica Standard library
- Double click on
Modelica.Blocks.Examples.Filter
- Right click on Filter and select Duplicate
Name: Filter Path: (blank)
- Change Modelica code in duplicated model
- A warning appears: Warning: You are changing a read-only class.
If I unload the model an re-open it, the read only warning is not shown any more...
Attachments (2)
Change History (17)
comment:1 by , 6 years ago
Milestone: | Future → 1.14.0 |
---|
follow-up: 4 comment:3 by , 6 years ago
I am also unable to reproduce the issue with the latest nightly build. @christian, what version of OMEdit are you using?
comment:4 by , 6 years ago
Replying to casella:
I am also unable to reproduce the issue with the latest nightly build. @christian, what version of OMEdit are you using?
I am using
OMEdit 1.14.0~dev-45-g9f3d0f7 Connected to OpenModelica 1.14.0~dev-285-g270177b Connected to OMSimulator unknown-linux
on Linux Mint 19.1 64bit XFCE.
comment:5 by , 6 years ago
I actually also tested this issue under Linux Mint 18.3 64bit XFCE. It does not work either on this version of Linux Mint.
comment:6 by , 6 years ago
Cc: | added |
---|
Maybe it' a Linux thing.
@Andrea.Bartolini, can you try this please?
comment:7 by , 6 years ago
I confirm the wrong behavior reported by Christian.
Moreover, if you modify the model (for example adding a parameter) and save it, the modification is saved, in spite of the shown warning.
OMEdit 1.14.0~dev-45-g9f3d0f7
Connected to OpenModelica 1.14.0~dev-285-g270177b
Connected to OMSimulator unknown-linux
Sysop: Linux Ubuntu 16.04
comment:8 by , 6 years ago
Then, the problem is probably caused by the way Linux handles file properties, which is different from Windows?
by , 6 years ago
Attachment: | script.mos added |
---|
comment:9 by , 6 years ago
I can't even reproduce it on Linux.
@Christian and @Andrea.Bartolini can you post the output of the attached script?
comment:10 by , 6 years ago
Here the output of the script on my PC:
andrea@andrea-hp-pavilion-notebook:~/Downloads$ omc script.mos
true
""
true
""
("model","Demonstrates the Continuous.Filter block with various options",false,false,false,"<interactive>",true,169,3,250,13,{},false,false,"","",false,"")
""
andrea@andrea-hp-pavilion-notebook:~/Downloads$
comment:12 by , 6 years ago
Ahh maybe for you the Modelica.Blocks.Examples.Filter
is readonly
and then the SOURCEINFO
is copied as it is.
comment:14 by , 6 years ago
I tested version
OMEdit 1.14.0~dev-47-g29420dd Connected to OpenModelica 1.14.0~dev-323-g220cd16 Connected to OMSimulator unknown-linux
and the issue does not appear any more. So it seems to be fixed from my point of view.
comment:15 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Please reopen if the issue pops up again.
It's not critical, but it would be nice to have it fixed in 1.14.0