Bug 117990 - In ER models adding associations will add blank space in the entity attributes
Summary: In ER models adding associations will add blank space in the entity attributes
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-09 12:43 UTC by MM
Modified: 2005-12-17 10:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix for the problem (376 bytes, patch)
2005-12-16 22:52 UTC, Matthias Kretz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MM 2005-12-09 12:43:43 UTC
Version:           1.5 (using KDE 3.5.0, Debian Package 4:3.5.0-1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.8-2-686

When drawing ER diagrams, every single association will add a blank line in the entity attributes. The entity cannot be resized, and it results in a huge waste of space, and in unpretty diagrams.
Comment 1 Oliver Kellogg 2005-12-10 17:59:20 UTC
I can't confirm this when adding associations.
However, when adding an entity attribute the attribute compartment
in the entity box is made taller than needed (a blank line appears
below the new attribute.)
Comment 2 Matthias Kretz 2005-12-16 22:52:31 UTC
Created attachment 13947 [details]
Fix for the problem

m_List apparently holds the associations in addition to the attributes, and it
seems that it holds even more, resulting in the minimum size reported by the
EntityWidget having far too much height. This patch filters out the attributes
and counts those for the calculation of the height.

If the patch is correct I'm happy to commit to 3.5 branch.
Comment 3 Oliver Kellogg 2005-12-16 23:59:34 UTC
> If the patch is correct I'm happy to commit to 3.5 branch.

Looks fine to me, go right ahead!
Comment 4 Matthias Kretz 2005-12-17 10:48:33 UTC
SVN commit 489110 by mkretz:

BUG: 117990

This fixes entity widgets being too high.



 M  +2 -1      entity.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/entity.cpp #489109:489110
@@ -167,7 +167,8 @@
 }
 
 int UMLEntity::entityAttributes() {
-    return m_List.count();
+    UMLClassifierListItemList entityAttributes = getFilteredList(Uml::ot_EntityAttribute);
+    return entityAttributes.count();
 }