Opened 5 years ago

Closed 5 years ago

#5733 closed defect (fixed)

Duplicate a model

Reported by: rajavigneshs@… Owned by: Adeel Asghar
Priority: high Milestone: 1.14.1
Component: OMEdit Version: v1.14.0-dev.beta2
Keywords: Cc:

Description

In OMEdit 1.14.0-dev.beta3, duplicate functionality is not working properly.
In the below TestPackage, when I try to duplicate the Model1 inside Package1 to Package2, it is not working. It throws invalid name error. It is the same when the TestPacakge is saved a single .mo file.
Duplicate works only if the model is duplicated to the top-level/outside of the package.

Attachments (1)

TestPackage.zip (1.9 KB ) - added by anonymous 5 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 by Adeel Asghar, 5 years ago

Seems like you forgot to attach the model.

comment:2 by Francesco Casella, 5 years ago

Resolution: duplicate
Status: newclosed

Duplicating models across packages doesn't yet work in OMEdit. This is a well known issue, see #5346.

@rajavigneshs, if you have any specific test case, please post it there.

by anonymous, 5 years ago

Attachment: TestPackage.zip added

comment:3 by rajavigneshs@…, 5 years ago

Resolution: duplicate
Status: closedreopened

@casella In the older version of OpenModelica 1.13, I was able to move models between package1 and package2 found in the TestPackage attachement.

comment:4 by Francesco Casella, 5 years ago

Milestone: 1.15.01.14.1

Aha, this makes it a regression then. We can try to fix it in 1.14.1.

@adease31 could you give quick look to understand what went wrong there?

Thanks!

comment:5 by Adeel Asghar, 5 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in 54e20a0/OpenModelica and ported it to 1.14 as well.

in reply to:  5 ; comment:6 by massimo ceraolo, 5 years ago

Replying to adeas31:

Fixed in 54e20a0/OpenModelica and ported it to 1.14 as well.

I'm glad this has been fixed.

I have a tiny request on duplicate that, if accepted, should require a very small effort to fix.
I write this here because it is a so simple request that should not require a ticket of its own.

I duplicate very often. I find very disappointing to find the Path field already filled in the duplicate dialog box (see dialog.png).
If I do not delete the current content of the pre-filled Path edit box, clicking on "Browse..." will show only locations starting from that path. 99% of the times I first delete the prefilled text, then I click on "Browse...". This slows down activity significantly.

I don' know what other users prefer.

What I propose is to implement ONE of these two options:

  • do not pre-fill the Path field
  • add a small cross aside the Path edit field to allow deleting the pre-filled text with one click before browsing.

The second option leaves the number of mouse clicking unchanged for those who prefer having Path field pre-filled.

Thanks

EDIT:
there is a third option, probably the best: just allow browsing also outside the scope of the model to be duplicated, as Dymola does. Yes, this should solve everything in the best way.

Last edited 5 years ago by massimo ceraolo (previous) (diff)

in reply to:  6 comment:7 by Francesco Casella, 5 years ago

Resolution: fixed
Status: closedreopened

in reply to:  5 comment:8 by Francesco Casella, 5 years ago

Replying to adeas31:

Fixed in 54e20a0/OpenModelica and ported it to 1.14 as well.

@adeas31, did you port it to 1.15 as well?

comment:9 by Adeel Asghar, 5 years ago

@ceraolo this is for sure small effort but is controversial. I remember this is done on a request however I don't remember the ticket number. My suggestion is we keep the field pre-filled but when user click on "Browse..." we shouldn't filter based on path instead we just select the path.

@casella ported it to 1.15

in reply to:  9 comment:10 by massimo ceraolo, 5 years ago

Replying to adeas31:

@ceraolo this is for sure small effort but is controversial. I remember this is done on a request however I don't remember the ticket number. My suggestion is we keep the field pre-filled but when user click on "Browse..." we shouldn't filter based on path instead we just select the path.


Excellent!

comment:11 by Francesco Casella, 5 years ago

OK

in reply to:  9 comment:12 by rajavigneshs@…, 5 years ago

Replying to adeas31:

@ceraolo this is for sure small effort but is controversial. I remember this is done on a request however I don't remember the ticket number. My suggestion is we keep the field pre-filled but when user click on "Browse..." we shouldn't filter based on path instead we just select the path.

@casella ported it to 1.15

Great. That would be very much user friendly!! Like @ceraolo, I also duplicate models a lot and it would be very subtle improvement, but makes the functionality much better.

comment:13 by Adeel Asghar, 5 years ago

Done in f60ffbd/OpenModelica. Since this is more of an enhancement so no need to back port this change.

in reply to:  13 comment:14 by massimo ceraolo, 5 years ago

Replying to adeas31:

Done in f60ffbd/OpenModelica. Since this is more of an enhancement so no need to back port this change.

You mean this will go into 1.16?
If the next release is 1.15, I expect that new features go there.
I don't even understand the meaning of "backporting to 1.15" since 1.15 has not been released yet.

comment:15 by Adeel Asghar, 5 years ago

Yes you are right. It will be part of 1.15 but not 1.14

comment:16 by Adeel Asghar, 5 years ago

Resolution: fixed
Status: reopenedclosed

Ported the fix to 1.15 branch so it will be part of 1.15 release.

Note: See TracTickets for help on using tickets.