DEFECT [Found in 629; existed before] Grouping Objects from different layers

@robgrz Had an interesting problem this morning. It presented in a very complex situation but I spent about an hour playing with different variations until I got to the simplest example to show the root cause.

Turns out that the problem exists when you group objects from different layers. One of the layers’ content will be MOVED to the other layer!

Here’s the example:
Two objects on different layers:

  • Select them both
  • Group
  • Ungroup
  • Deselect

As you can see, both are now members of Layer 2!

EDIT: Note that the Default layer is remaining the active layer throughout this process…so why Layer 2 is chosen is odd as well.

  • Gary

In other drawing programs, this same thing happens — objects can’t exist on more than one layer at a time and a group can only be on one layer — some drawing programs handle this by having a preference for “Object remembers layers” which will cause the object(s) to go back to the original layer after ungrouping — this can be confusing for folks though.

OK Will…but still…this is sort of arbitrarily choosing one of the layers to put them all on…the DEFAULT layer doesn’t even end up with them.

The behaviour I’m seeing is that when ungrouped the elements are left on the layer which the group was then on.

Which layer is that? The group is placed on an arbitrary layer. Default layer is active in my example. The group ends up on layer 2

If you don’t group them, the objects remain in the appropriate layers (the one they came in on)

Given a set of objects on different layers:

we select two and group them:

they move to the layer which one of those objects is on.

If we then change which layer is active:

and select the group and ungroup it:

the objects remain on the same layer.

Will…I get all of that…but you’re just ignoring the problem with the “Activate the layer you want them on and move them there”. That doesn’t fix the problem, that works around it. I know how (and already did) work around the problem for my application. I’m logging a defect.

I’d have to go through the code to remember the exact behavior, and whether or not there’s a bug in it but, going from memory, the intended logic is:

  • All items in a group must be moved to the same layer so there are no edge cases around selecting a group. For example, selecting a group, but part of the group is on a hidden layer that cannot be selected.
  • If any of the items are on the current active layer, they should all be moved to that layer.
  • If none of the items being grouped are on the active layer, it should move everything to the layer of the first item in the selection list.

I’d actually prefer that the logic be to move everything to the active layer if that seems more clear, and there’s no other edge case that doesn’t come to mind right now.

would it be worth considering using a slightly tweaked icon for cross-layer grouping to make it more clear that what you selected is in multiple layers?

(I’m still kind of wishing that the left icon bar would have an “embedded” layer list in it at the bottom… avoiding the need for the separate dialog for some of the common operations. and when you have that, you could show – during the selection process – which layers have something selected from them)

@robgrz The scenario that surfaced this for me might just be another issue that might be an extension of the “select all across hidden layers” problem that you just fixed:

I embedded a c2D with 2 layers, one of which was hidden. The layer imported as hidden - as were the objects within that layer, however, when it imported, all of the items were selected, including those on the hidden layer. When I grouped the objects on the screen after import (and only the non-hidden objects were visible), they ALL moved to the second layer…which was (coincidentally) the hidden layer, and they disappeared! I found them all by showing the hidden layer. If you’d like the c2ds, I can provide it.

  • Gary

Referring to your thoughts on logic…I think a single consistent result is better than a decision tree - so I really like your idea of just moving everything to the active layer. That would make sense to me and I can anticipate it.

We would still need to change the thing I just reported (one above this post) regarding the import “selecting” all items, including those not visible and then grouping grabbing invisible items.

I misunderstood the problem you reported, I get it now (and this is why I don’t do support). It’ll be fixed in 630.

3 Likes

Confirmed fixed in 630. You do a pretty good job of support :slight_smile: Don’t sell yourself short.

This topic was automatically closed after 30 days. New replies are no longer allowed.