GNOME Bugzilla – Bug 343074
Lines get disconnected from the outside objects when grouped
Last modified: 2019-03-20 11:25:26 UTC
If we group some arrows that are conected to strutures, like Boxes, and then if we un-group we lost all the connections points that the arrows had. Other information: I try this in Windows
Yes. This is a known bug that is caused by the way groups currently function (i.e. the grouped objects are removed from the diagram). Fixing this is on my plate for next release.
Sorry, can't reproduce. The group object maintains the connections as its own and ungrouping should simply restore, except it sometimes crashed, but that got recently fixed: 2008-04-08 Hans Breuer <hans@breuer.org> * lib/object.c(object_copy_list) : if we can't find the object to to connect to ensure there is no dangling reference. Fixes bug #497070 * lib/group.c(group_copy) : some comment
I can reproduce this in 0.96.1 on hardy
Looking again I can see the issue, before I was too focussed on the (wrong) terminology before. Arrows do not have connection points: Lines with arrows have handles connecting to connection points which are part of boxes. This is relevant because connection points distribute accross different objects ("boxes") which get group stay connected to the outside of the group. Of course also connections between two objects which get grouped are maintained. Just the "underspecified" case of lines which get grouped independent of the object they connect to is under question. I've played a bit with the source to maintain the connections even in this case, but it would break another invariant of group, namely: "grouped objects are immovable within the group". Also groups are not resizable yet. *If* we would allow the connections to remain these invariants would obviously break when moving the connected object or the grouped lines. I'm uncertain if this would be an improvement, but given that the current behaviour behaves as designed, the issue at hand does not qualify as a bug IMO. If I understood Lars comment correctly, he is talking of the unfinished "new group" effort, where I was not yet able to wrap my head around. So without a convincing patch I don't think the behaviour will change.
I have a similar problem. The removal of those connections does not happen all the time (for me it should never in the case below). In the attached example, Rectangle A and B and the connector below are grouped. You can move the group and the above connectors follow. Also, if the group is ungrouped, the connections of the connector below remained. The group with C and D applies. If I group everything in the diagram, the connections of the above connectors are gone (actually, they're already gone when grouping => not in the file). The structure of the shapes (two blocks and a poly-line-connector) is the same, the behaviour differs.
Created attachment 235214 [details] the file for comment 5
Created attachment 235319 [details] [review] A patch with very unsafe code and only brief testing but it solves comment 5 for me. this is only tested with old groups, not with new groups. solving the problem is inpossible without changing the copy-operation called that way: obj->ops->copy(obj); because the needed deep orig-copy-table cannot be created in a safe way without an additional parameter. ***** additionally i found a bug concerning the connections reproduce that way: * add two rectangles * add a line, connect to one of the rectangles * group the two rectangles * delete the group then you will see that the connection is not deleted in the group (red box) * if you store now, the connection will be in the file
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/166.