Bug 329500 - Layout generator does not support multiple widgets of same object
Summary: Layout generator does not support multiple widgets of same object
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Ralf Habacker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-01 13:45 UTC by Joris Steyn
Modified: 2014-08-30 23:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joris Steyn 2014-01-01 13:45:24 UTC
Reproducable in all versions of Umbrello.

Reproducible: Always

Steps to Reproduce:
1. Add a class widget to a diagram
2. Copy -> paste the widget
3. Right click diagram -> apply a layout
Actual Results:  
The two widgets are placed on the exact same position.

Expected Results:  
Generator should recognize the two different widgets.
Comment 1 Ralf Habacker 2014-02-26 18:21:37 UTC
A (positive) side effect of the the copy and paste refactoring is that it is now possible to copy and paste multiple widgets of the same class into a class diagram.  
The layout (and dot-) generator use the widget id() to distinct widgets on the diagram, which do not support this case. They need to use the newly implemented "localID" design. 

The id is currently fetched through UMLWidget::id() and AssociationWidget::widgetIDForRole(). The first one could be easily refactored, while the latter contains a more complicated implementation going over more call levels. May be the best to add an AssociationWidget::widgetLocalIDForRole() for this purpose.
Comment 2 Ralf Habacker 2014-02-27 11:08:06 UTC
Git commit 0cafa22e2cd2787d45957b08ac0e7333253ba8de by Ralf Habacker.
Committed on 27/02/2014 at 08:32.
Pushed by habacker into branch 'master'.

Let layout generator handle multiple widgets of a single class.

M  +3    -3    umbrello/dotgenerator.cpp
M  +4    -4    umbrello/layoutgenerator.h
M  +19   -0    umbrello/widgets/associationwidget.cpp
M  +1    -0    umbrello/widgets/associationwidget.h

http://commits.kde.org/umbrello/0cafa22e2cd2787d45957b08ac0e7333253ba8de
Comment 3 Ralf Habacker 2014-02-27 11:08:53 UTC
Git commit a4aabd5b70158c405b0e1472d1a4073edab2309e by Ralf Habacker.
Committed on 27/02/2014 at 08:32.
Pushed by habacker into branch 'KDE/4.13'.

Let layout generator handle multiple widgets of a single class.
(cherry picked from commit 0cafa22e2cd2787d45957b08ac0e7333253ba8de)

M  +3    -3    umbrello/dotgenerator.cpp
M  +4    -4    umbrello/layoutgenerator.h
M  +19   -0    umbrello/widgets/associationwidget.cpp
M  +1    -0    umbrello/widgets/associationwidget.h

http://commits.kde.org/umbrello/a4aabd5b70158c405b0e1472d1a4073edab2309e
Comment 4 Ralf Habacker 2014-07-19 09:20:45 UTC
Git commit 45d7fb6301b2f6f4b2cc595dbd85e8b6f415d43b by Ralf Habacker.
Committed on 27/02/2014 at 08:32.
Pushed by habacker into branch 'KDE/4.14'.

Let layout generator handle multiple widgets of a single class.

M  +324  -0    umbrello/layoutgenerator.h

http://commits.kde.org/umbrello/45d7fb6301b2f6f4b2cc595dbd85e8b6f415d43b
Comment 5 Ralf Habacker 2014-07-22 10:01:12 UTC
Git commit 7d214c1bdd14332bcac65fe9b8b325674c60dbae by Ralf Habacker.
Committed on 27/02/2014 at 08:32.
Pushed by habacker into branch 'master'.

Let layout generator handle multiple widgets of a single class.

M  +324  -0    umbrello/layoutgenerator.h

http://commits.kde.org/umbrello/7d214c1bdd14332bcac65fe9b8b325674c60dbae
Comment 6 Ralf Habacker 2014-07-23 06:31:22 UTC
Git commit ac1d7e5182e91b4c398238204b7388de3fd2b5a2 by Ralf Habacker.
Committed on 27/02/2014 at 08:32.
Pushed by habacker into branch 'work/xmi2pot'.

Let layout generator handle multiple widgets of a single class.

M  +324  -0    umbrello/layoutgenerator.h

http://commits.kde.org/umbrello/ac1d7e5182e91b4c398238204b7388de3fd2b5a2
Comment 7 Ralf Habacker 2014-08-30 23:05:09 UTC
Git commit 0398cc1ac5b31e33edffa72efd19429b388f4a84 by Ralf Habacker.
Committed on 27/02/2014 at 08:32.
Pushed by habacker into branch 'master'.

Let layout generator handle multiple widgets of a single class.

M  +324  -0    umbrello/layoutgenerator.h

http://commits.kde.org/umbrello/0398cc1ac5b31e33edffa72efd19429b388f4a84