+++ This bug was initially created as a clone of Bug #495707 +++
There is a compartment layout problem when addition of semantic elements involved a refresh of a diagram.
Steps to reproduce:
* Import the project CompartimentsLayoutProblem from attached archive file
* Open the diagram "HStackDiag"
* Open the file My.ecore with the "Sample Ecore Model Editor"
* Copy the package "P1" in package "root" and rename it to "P2"
* Save the ecore file
* The diagram "HStackDiag" is refreshed:
** The new package P2 is created: OK
** The existing package P1 is auto-sized: KO. There is also a bug in the size of the container "P1" or its region "Left_class1" (the bug 495046 corresponds to this other problem).
If you do the same with the diagram "HStackDiagPinned" there is no problem. The difference between the 2 diagrams is that the package P1 is pinned in "HStackDiagPinned".