[Uml-devel] kdesdk/umbrello/umbrello

Brian Thomas thomas at mail630.gsfc.nasa.gov
Thu Sep 25 11:29:10 UTC 2003


CVS commit by thomas: 

carrying the association operator == patch to the 'logical' conclusion: we dont need to be checking the associations connections to floating text widgets, rather we should only be comparing widget id's and the UMLAssociation child object for the relevant data (along with association Type)


  M +7 -0      associationwidget.cpp   1.50
  M +3 -3      umlwidget.cpp   1.53


--- kdesdk/umbrello/umbrello/associationwidget.cpp  #1.49:1.50
@@ -170,4 +170,6 @@ bool AssociationWidget::operator==(Assoc
                 return false;
 
+/*
+        // can cause infinite loop
         if( !m_pName || !Other.m_pName ) {
                 if( !Other.m_pName && m_pName )
@@ -225,8 +227,12 @@ bool AssociationWidget::operator==(Assoc
         } else if ( !(*m_pChangeWidgetB == *(Other.m_pChangeWidgetB)) )
                 return false;
+*/
 
         if (getAssocType() != Other.getAssocType())
                 return false;
 
+/*
+        // these arent needed..contained in UMLAssociation
+        // and dont occur if a 'plain' association
         if (getVisibilityA() != Other.getVisibilityA())
                 return false;
@@ -240,4 +246,5 @@ bool AssociationWidget::operator==(Assoc
         if (getChangeabilityB() != Other.getChangeabilityB())
                 return false;
+*/
 
         if (getWidgetAID() != Other.getWidgetAID())

--- kdesdk/umbrello/umbrello/umlwidget.cpp  #1.52:1.53
@@ -162,6 +162,6 @@ bool UMLWidget::operator==(const UMLWidg
         }
 
-        if(getBaseType() != wt_Text) // DONT do this for floatingtext widgets, an infinite loop will result
-        {
+//      if(getBaseType() != wt_Text) // DONT do this for floatingtext widgets, an infinite loop will result
+//      {
                 AssociationWidgetListIt assoc_it( m_Assocs );
                 AssociationWidgetListIt assoc_it2( other.m_Assocs );
@@ -174,5 +174,5 @@ bool UMLWidget::operator==(const UMLWidg
                         }
                 }
-        }
+//      }
         return true;
         // NOTE:  In the comparison tests we are going to do, we don't need these values.






More information about the umbrello-devel mailing list