Opened 7 years ago

Closed 6 years ago

#4595 closed defect (fixed)

Reordering models in a package has no permanent effect

Reported by: Francesco Casella Owned by: Adrian Pop
Priority: blocker Milestone: 1.14.0
Component: Interactive Environment Version:
Keywords: Cc:

Description

Open the attached P package. Browse to P.Q, select M2, then press Ctrl-Up to shift M2 before M1. Select P.Q and save.

Nothing happens to package.order, so the reordering is lost when the package is reloaded later on from disk.

Attachments (3)

P.zip (1.2 KB ) - added by Francesco Casella 7 years ago.
P1.zip (1.8 KB ) - added by Adeel Asghar 7 years ago.
TestMovePackage.mo (167 bytes ) - added by Francesco Casella 6 years ago.

Download all attachments as: .zip

Change History (9)

by Francesco Casella, 7 years ago

Attachment: P.zip added

by Adeel Asghar, 7 years ago

Attachment: P1.zip added

comment:1 by Adeel Asghar, 7 years ago

Component: OMEditInteractive Environment
Owner: changed from Adeel Asghar to Per Östlund
Status: newassigned

The problem is with moveClass API. I have slightly updated your example to show the problem. moveClass API does work fine for sub classes of a top level package but doesn't work for sub classes of sub packages.

Inside P1.zip there is a P1.mos script file which shows the problem.
Note that the sub class P1.N2 moves correctly but P1.Q.M2 does not.

comment:2 by Francesco Casella, 6 years ago

Owner: changed from Per Östlund to Adrian Pop

@adrpo, can you please fix this once replaceable is in place?

comment:3 by Francesco Casella, 6 years ago

Priority: criticalblocker

As noted in comment:1, the problem does not depend on having packages in separate files, in fact I have the same issue with model contained in sub-packages where the master package is contained in a single file.

To reproduce:

  • open the attached TestMovePackage.mo
  • open packages A and B
  • move M1 before M2
  • save
  • unload the package
  • reload the package
  • the models M1 and M2 are still in the wrong order

by Francesco Casella, 6 years ago

Attachment: TestMovePackage.mo added

comment:4 by Francesco Casella, 6 years ago

Summary: Reordering models in a package which are saved as separate files has no permanent effectReordering models in a package has no permanent effect

comment:5 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0

comment:6 by Francesco Casella, 6 years ago

Resolution: fixed
Status: assignedclosed

I tried the procedure in comment:3 and the problem seems to be fixed.

I guess this is a duplicate of #4438 that was eventually fixed 4 months ago.

Note: See TracTickets for help on using tickets.