Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.


Edit -> Lower Layer Not Preserved in Save File

+1 vote

I have a diagram drawn using mostly using the Entity Relationship palette.

I also have a number of nested group nodes which serve to structure the entities.

The root group node (and the nested groups it contains) should appear as the lowest layer in the diagram.  Selecting the root group node and choosing Edit -> Lower Layer makes this happen.

However, after saving the diagram, closing the file, and then reopening, the root group node appears as the uppermost layer, obscuring the entities within it.


(Confidentially I am happy to share the file so you can debug this)
in Help by (230 points)
recategorized by

1 Answer

0 votes

If the nested groups are really nested within the root group node, then this should not happen at all. Also, it shouldn't be neccessary to use the "Lower Selection" in the first place, since nested structures are by default painted in proper order so that the nested elements are always on top of their containing elements.

That said, are you sure that your root group node really contains your nested groups? Or do they only happen to overlap with it?

You can test this, for example, by moving the nested groups around. If the root group node resizes as the moved groups approach the border of it, then they are contained. If you can move the nested groups beyond the border and the root group node does not resize, they weren't nested in the first place.
(Alternatively, you can also just have a look at the object tree in the Structure View to see whether the nested groups are on a level that is more indented than the level of the root group node... :-)

by [yWorks] (23.7k points)
Thomas, ah I can see my problem, but I don't know how to fix it.

In the structure view I have
+ Graph
     + Root Group Node One
          + Nested Group Node One-1
              + Nested Group Node One-2
     + Root Group Node Two
         o Entity A
         o Entity B
      o Entity C

When I first open the file root group node two and all the entities are "hidden" behind root group node one until I lower root group now one.    As soon as I lower root group node one the diagram appears as I want it.

I can see based on your comments what I need to do is move "root group node one" to the end of the structure list... but the list appears to be sorted alphabetically...

There is some misunderstanding regarding what I meant with "level", I guess. It's meant like so:

+ Graph -- Level: 0
   + Root Group Node One -- Level: 1
      + Nested Group Node One-1 -- Level: 2
         + Nested Group Node One-2 -- Level: 3
   + Root Group Node Two -- Level: 1
      o Entity A -- Level: 2
      o Entity B -- Level: 2
   o Entity C -- Level: 1

Where level 2 elements, for example, are contained (nested) in the nearest level 1 elements when going upward in the object tree in the Structure View.

To achieve the proper nesting structure, do the following in the Structure View:
With your mouse, drag the entry for Root Group Node Two onto the entry for Root Group Node One. This will nest Root Group Node Two (with its nested contents, Entity A and Entity B) within Root Group Node One. Do the same with Entity C.

The object tree should look like this after these operations:

+ Graph -- Level: 0
   + Root Group Node One -- Level: 1
      + Nested Group Node One-1 -- Level: 2
         + Nested Group Node One-2 -- Level: 3
      + Root Group Node Two -- Level: 2
         o Entity A -- Level: 3
         o Entity B -- Level: 3
      o Entity C -- Level: 2

Unfortunately that doesn't work for me.  My Root Group Node Two overlaps (i.e. partially falls outside the bounds) of Root Group Node One!  

They are two independent sets of nested group nodes.

Is there no way to force Root Group Node Two to be drawn on top of Root Group Node two - i.e. choose the order / layer of root group nodes?  

Right now it appears its based on alphabetic order of the Root Group Node names - is that correct?

The order in the structure view is not the drawing order. The structure view is always ordered alphabetically. The drawing order is basically the order of creation up until you use "Lower Selection"/"Raise Selection". Unfortunately, any changes due to lower/raise selection are currently lost on save/re-load (see also Yed keeps forgetting Z order).

Is this "bug" on the "soon to be fixed" list - or would me submitted a separate bug report help?
Legal Disclosure | Privacy Policy