Bug 117990

Summary: In ER models adding associations will add blank space in the entity attributes
Product: [Applications] umbrello Reporter: MM <radar>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal CC: kretz
Priority: NOR    
Version: 1.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Fix for the problem

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();
 }