After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 343074 - Lines get disconnected from the outside objects when grouped
Lines get disconnected from the outside objects when grouped
Status: RESOLVED OBSOLETE
Product: dia
Classification: Other
Component: general
0.96.1
Other All
: Normal enhancement
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-27 00:24 UTC by muek
Modified: 2019-03-20 11:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the file for comment 5 (1.20 KB, application/x-dia-diagram)
2013-02-05 14:48 UTC, stth1998
  Details
A patch with very unsafe code and only brief testing but it solves comment 5 for me. (4.36 KB, patch)
2013-02-06 17:38 UTC, stth1998
none Details | Review

Description muek 2006-05-27 00:24:40 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
Comment 1 Lars Clausen 2006-05-27 06:35:07 UTC
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.
Comment 2 Hans Breuer 2008-04-27 12:32:04 UTC
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
Comment 3 Rolf Leggewie 2008-08-10 04:17:57 UTC
I can reproduce this in 0.96.1 on hardy
Comment 4 Hans Breuer 2009-11-13 17:32:28 UTC
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.
Comment 5 stth1998 2013-02-05 14:47:35 UTC
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.
Comment 6 stth1998 2013-02-05 14:48:33 UTC
Created attachment 235214 [details]
the file for comment 5
Comment 7 stth1998 2013-02-06 17:38:03 UTC
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
Comment 8 GNOME Infrastructure Team 2019-03-20 11:25:26 UTC
-- 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.