[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Thu Nov 25 12:57:19 UTC 2004


CVS commit by okellogg: 

updateObject(): Display UMLClassifierListItem::toString(Uml::st_SigNoScope)
 in case m_pObject is a UMLAttribute or UMLOperation.


  M +8 -2      umllistviewitem.cpp   1.62


--- kdesdk/umbrello/umbrello/umllistviewitem.cpp  #1.61:1.62
@@ -185,8 +185,14 @@ void UMLListViewItem::updateObject() {
 
         Uml::Scope scope = m_pObject->getScope();
-        setText( m_pObject->getName() );
+        Uml::Object_Type ot = m_pObject->getBaseType();
+        QString modelObjText = m_pObject->getName();
+        if (ot == Uml::ot_Operation || ot == Uml::ot_Attribute) {
+                UMLClassifierListItem *pNarrowed = static_cast<UMLClassifierListItem*>(m_pObject);
+                modelObjText = pNarrowed->toString(Uml::st_SigNoScope);
+        }
+        setText(modelObjText);
 
         UMLListView::Icon_Type icon = UMLListView::it_Home;
-        switch( m_pObject->getBaseType() ) {
+        switch (ot) {
                 case Uml::ot_Actor:
                         icon = UMLListView::it_Actor;






More information about the umbrello-devel mailing list