Bad selection of collapsed subgraph

Hello,

I have a SubGraph whose CollapsedObject is set to a GoImage. This SubGraph also has a label. When collapsed, it really looks like a GoGeneralNode.

When PickableBackground is true, and the node is collasped, the graph is selected wherever we click inside its bounding box, even if this is outside of the collapsed object. When PickableBackground is false, only the icon is active for selection.

I could correct the problem by setting PickableBackground to true/false in the Expand/Collapse functions of the subgraph, but I really wonder if this is the desired behaviour, and if I missed something.

Best regards,

What version are you running?

The CollapsedObject, Handle, Port, and Label are left visible when you collapse.
Are other other parts (like other ports) that you are leaving Visible?

I would think that the area of the node that would be pickable would be the union of the bounds of all of those four Visible children plus anything you've added...

Since the extra ports might extend beyond the bounds of the CollapsedObject, the pickable area would be larger than the CollapsedObject.

We believe your reasoning is correct -- you should change the value of
PickableBackground in Collapse and in Expand overrides.

You should also confirm that the CollapsedObject is not Selectable.

Here is a picture of a collapsed subgraph (on this particular case, it does not have ports, but the problem is still here).

When you speak of union, do you mean the bounding box of all individual bounding boxes, or a real union of boxes ? Anyway, here is the same graphic with some debug info:

Anywhere we click with the purple rectangle is interpreted as a selection of the node.

[QUOTE=Jake]We believe your reasoning is correct – you should change the value of
PickableBackground in Collapse and in Expand overrides.

You should also confirm that the CollapsedObject is not Selectable.
[/quote]
It is not.