Bug 106632: relationships between interfaces and classes change over file reload (normal)
Opened:2005-06-01 22:14
Product:umbrello
Component:general
Version:unspecified
Status:RESOLVED
Platform:Gentoo Packages
Resolution:FIXED
Reporter:Søren Holm
Assigned to:Oliver Kellogg

Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          GCC 3.4.3 CFLAGS=-march=pentium4 -O3 -pipe -fomit-frame-pointer    CXXFLAGS=-march=pentium4 -O3 -pipe -fomit-frame-pointer -fvisibility-inlines-hidden
OS:                Linux

I have two interfaces and two classes - Interface1 and Interface2, Class1 and Class2. Class1 inherits Interface1, Class2 inherits Interface2. Now I want Class1 to have and association to Inteface2 and Class2 to have and association to Interface1. Like this : http://sgh.dk/~sgh/classes.png

It looks very nice. Now I save the model and closes the file. When I read in the file again (whithout closing umbrello, it looks like this : http://sgh.dk/~sgh/classes2.png

If I'm using directional associations, the association becomes inheritance after a diagram reload.


------- Additional Comment #1 From Oliver Kellogg 2005-06-01 23:37 -------
Wow.


------- Additional Comment #2 From Oliver Kellogg 2005-06-02 00:45 -------
SVN commit 420991 by okellogg:

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


 M  +1 -1      ChangeLog  
 M  +4 -2      umbrello/association.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #420990:420991
 at  at  -5,7 +5,7  at  at
 * 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
+57588 67719 79433 87252 88117 105564 106632
 
 Version 1.4.1 (maintenance release)
 
--- trunk/KDE/kdesdk/umbrello/umbrello/association.cpp #420990:420991
 at  at  -148,8 +148,10  at  at
  if (successA && successB) {
  UMLObject *objA = getUMLRole(A)->getObject();
  UMLObject *objB = getUMLRole(B)->getObject();
- if (objA && objA->getBaseType() == Uml::ot_Interface ||
-     objB && objB->getBaseType() == Uml::ot_Interface)
+ // Check if need to change the assoc type to Realization
+ if (m_AssocType == Uml::at_Generalization &&
+     (objA && objA->getBaseType() == Uml::ot_Interface ||
+      objB && objB->getBaseType() == Uml::ot_Interface))
  m_AssocType = Uml::at_Realization;
  UMLDoc *doc = UMLApp::app()->getDocument();
  doc->addAssocToConcepts(this);


------- Additional Comment #3 From Oliver Kellogg 2005-06-02 18:16 -------
*** Bug 106673 has been marked as a duplicate of this bug. ***


Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments:


View Bug Activity   |   Format For Printing


Attachment Type Modified Status Actions
Create a New Attachment (proposed patch, testcase, etc.) View All


Actions: Query | Reports Search:   New Account | Log In