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

Sharan Rao sharanrao at gmail.com
Tue Nov 13 21:39:07 UTC 2007


SVN commit 736292 by sharan:

Two association widgets should not be equal if they don't have a model representation.(any counter-opinions ?)
possible fix to bug 151511


 M  +5 -0      associationwidget.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/associationwidget.cpp #736291:736292
@@ -186,11 +186,16 @@
     if( this == &Other )
         return true;
 
+    // if no model representation exists, then the widgets are not equal
+    if ( getAssociation() == NULL && Other.getAssociation() == NULL )
+        return false;
+
     if( !m_pObject || !Other.m_pObject ) {
         if( !Other.m_pObject && m_pObject )
             return false;
         if( Other.m_pObject && !m_pObject )
             return false;
+
     } else if( m_pObject != Other.m_pObject )
         return false;
 




More information about the umbrello-devel mailing list