Bug 109591 - Relations between classes aren't updeatable
Summary: Relations between classes aren't updeatable
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.4.1
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 13:40 UTC by greatbunzinni
Modified: 2005-07-26 05:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description greatbunzinni 2005-07-25 13:40:15 UTC
Version:           1.4.1 (using KDE KDE 3.4.1)
Installed from:    Unspecified Linux
OS:                Linux

When a new atribute is inserted into a class, the class diagram window and relations between classes aren't updated. To make matters worse, there isn't an option to do it by hand.
Comment 1 Oliver Kellogg 2005-07-25 22:22:58 UTC
> To make matters worse, there isn't an option to do it by hand.

Well, there is an (admittedly unwieldy) workaround:
Delete the target class (i.e. the class representing the type
of the newly added attribute) from the diagram area and
re-drag it from the list view to the diagram.
Comment 2 Oliver Kellogg 2005-07-26 05:53:16 UTC
SVN commit 438773 by okellogg:

UMLView::createAutoAttributeAssociations(): Make public.
UMLWidget::updateWidget(): Invoke UMLView::createAutoAttributeAssociations()
 if the widget represents a class.
BUG:109591


 M  +2 -1      ChangeLog  
 M  +8 -5      umbrello/umlview.h  
 M  +3 -0      umbrello/umlwidget.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #438772:438773
@@ -1,11 +1,12 @@
 Version 1.5
 
 * Association classes
+* Advanced code generator for Ruby
 * Externalization of folders (i.e. submodel files)
 * 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 108223
+57588 67719 79433 87252 88117 97162 105564 108223 109591
 
 Version 1.4.2 (maintenance release)
 
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.h #438772:438773
@@ -720,6 +720,14 @@
     void createAutoAssociations( UMLWidget * widget );
 
     /**
+     * If the m_Type of the given widget is Uml::wt_Class then
+     * iterate through the class' attributes and create an
+     * association to each attribute type widget that is present
+     * on the current diagram.
+     */
+    void createAutoAttributeAssociations(UMLWidget *widget);
+
+    /**
      * Refreshes containment association, i.e. removes possible old
      * containment and adds new containment association if applicable.
      *
@@ -1131,11 +1139,6 @@
     QRect getDiagramRect();
 
     /**
-     * Auxiliary method for createAutoAssociations()
-     */
-    void createAutoAttributeAssociations(UMLWidget *widget);
-
-    /**
      * Selects all the widgets of the given association widget.
      */
     void selectWidgetsOfAssoc (AssociationWidget * a);
--- trunk/KDE/kdesdk/umbrello/umbrello/umlwidget.cpp #438772:438773
@@ -331,6 +331,9 @@
 {
     calculateSize();
     adjustAssocs( getX(), getY() ); //adjust assoc lines.
+    if (m_Type == Uml::wt_Class) {
+        m_pView->createAutoAttributeAssociations(this);
+    }
     if(isVisible())
         update();
 }