Opened 7 years ago
Closed 3 years ago
#4876 closed defect (fixed)
Weird behavior of "Save as" in OMEdit
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | OMEdit | Version: | v1.13.0-dev-nightly |
Keywords: | Cc: |
Description
Consider any Modelica class, e.g.,
model Test constant Real one=1; equation end Test;
In OMEdit hit CTRL+S to save the file. The select File -> Save AS. A window appears which allows the input of two fields:
Name: Path:
There are two aspects I want to point out here:
1. PATH
Why is Path used here at all? When it comes to save a class or package as something, I would not expect to pick a different Modelica path.
If I pick the case of
Name: Test Path: Test
then a duplicate of Test is created within model Test which seems not be legal Modelica code. This behavior reminds me of #4875, however.
2. DIFFERENT NAME
If I pick
Name: Test2 Path:
instead, a duplicate of Test is created as Test2 and a dialog appears as expected to pick a new location to store the class or package. The class is then renamed and stored under the new name. So the input of a path is not required here.
Change History (9)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
It is, however, possible in Dymola to save model (Test) in a different folder, without the strict need to rename the model. This behavior is NOT possible in OpenModelica. If I keep the name (Test) an press OK, then an error message appears:
class Test already exists in Top Level.
In OpenModelica one has to pick a different name in order to get to the dialog where the folder location of the renamed model can be picked. If, instead of the error message, a "Save as" dialog appeared, I think the behavior were OK.
comment:4 by , 6 years ago
@adeas31, could this be fixed? I also find quite annoying that I cannot save a package somewhere else without changing its name, which is normally something you don't want to do - you just need to save the same package somewhere else.
comment:5 by , 5 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:7 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
comment:9 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Yeah this is because save as is duplicate behind the scenes and I don't remember why. Perhaps we have just followed Dymola. I checked in Dymola and its the same behavior.
I think there was some reason behind doing this which I don't remember at the moment.