[Uml-devel] KDE/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Tue Oct 11 14:02:29 UTC 2005


SVN commit 469650 by okellogg:

apply commit 469648 from branches/KDE/3.5

 M  +7 -2      umlview.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp #469649:469650
@@ -2385,7 +2385,9 @@
     //   if this object is capable of containing nested objects then
     //     for each of the object's containedObjects
     //       if the containedObject has a widget representation on this view then
-    //         create the containment AssocWidget
+    //         if the containedWidget is not physically located inside this widget
+    //           create the containment AssocWidget
+    //         end if
     //       end if
     //     end loop
     //   end if
@@ -2493,6 +2495,9 @@
             for (UMLWidget *w = m_WidgetList.first(); w; w = m_WidgetList.next()) {
                 if (w->getID() != id)
                     continue;
+                // if the containedWidget is not physically located inside this widget
+                if (widget->rect().contains(w->rect()))
+                    continue;
                 // create the containment AssocWidget
                 AssociationWidget *a = new AssociationWidget(this, widget,
                                        at_Containment, w);
@@ -2516,7 +2521,7 @@
         if (pWidget->getID() == pkgID)
             break;
     }
-    if (pWidget == NULL)
+    if (pWidget == NULL || pWidget->rect().contains(widget->rect()))
         return;
     // create the containment AssocWidget
     AssociationWidget *a = new AssociationWidget(this, pWidget, at_Containment, widget);




More information about the umbrello-devel mailing list