Bug 106673

Summary: associations turn into generalisation over file reopen
Product: [Applications] umbrello Reporter: Søren Holm <sgh>
Component: generalAssignee: Oliver Kellogg <okellogg>
Status: RESOLVED FIXED    
Severity: normal CC: akruijff
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Søren Holm 2005-06-02 15:02:32 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          GCC 3.4.3
OS:                Linux

I'm making a diagram with 2 classes and 2 interfaces.
Class1 inherits Interface1, Class2 inherits Interface2.
Furthermore the to classes have associations to the 2 interfaces

Like this: http://sgh.dk/~sgh/classes01.png

Anyway, when I close the diagram and open it again right away, the association
has turned into generalisations

Like this: http://sgh.dk/~sgh/classes02.png
Comment 1 Oliver Kellogg 2005-06-02 18:16:32 UTC

*** This bug has been marked as a duplicate of 106632 ***
Comment 2 Søren Holm 2005-06-02 21:20:20 UTC
No, this bug is not a duplicate of bug #106632
The fix to this is in svn, and the svn-version still misbehaves,
allthough #106632 is confirmed to be fixed
Comment 3 Oliver Kellogg 2005-06-02 21:34:58 UTC
Ouch.
Comment 4 Oliver Kellogg 2005-06-02 22:14:39 UTC
SVN commit 421347 by okellogg:

load(): Only consider assoc type change to at_Realization if current type is
 at_Generalization.
BUG:106673


 M  +6 -1      ChangeLog  
 M  +3 -2      umbrello/association.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #421346:421347
@@ -5,8 +5,13 @@
 * Change interface into class and vice versa (if abstract and no attributes)
 
 * Bugs fixed / wishes implemented (see http://bugs.kde.org)
-57588 67719 79433 87252 88117 105564 106632
+57588 67719 79433 87252 88117 105564
 
+Version 1.4.2 (maintenance release)
+
+* Bugs fixed from http://bugs.kde.org :
+106632 106673
+
 Version 1.4.1 (maintenance release)
 
 Bugs fixed:
--- trunk/KDE/kdesdk/umbrello/umbrello/association.cpp #421346:421347
@@ -266,8 +266,9 @@
                 // is not complete, so we need to finish the analysis here.
 
 		// its a realization if either endpoint is an interface
-		if (obj[A] && obj[A]->getBaseType() == Uml::ot_Interface ||
-		    obj[B] && obj[B]->getBaseType() == Uml::ot_Interface)
+		if (m_AssocType == Uml::at_Generalization &&
+		    (obj[A] && obj[A]->getBaseType() == Uml::ot_Interface ||
+		     obj[B] && obj[B]->getBaseType() == Uml::ot_Interface))
 			m_AssocType = Uml::at_Realization;
 
 		return true;
Comment 5 Oliver Kellogg 2005-06-04 19:51:48 UTC
*** Bug 106780 has been marked as a duplicate of this bug. ***