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

Sharan Rao sharanrao at gmail.com
Sat Jun 23 12:12:48 UTC 2007


SVN commit 679232 by sharan:

Double clicking on listviewitem for any classifierlisitem will now show properties dialog for parent classifier.



 M  +1 -1      dialogs/classpropdlg.h  
 M  +20 -6     umllistview.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/classpropdlg.h #679231:679232
@@ -71,7 +71,7 @@
      */
     ~ClassPropDlg();
 
-    enum Page{page_gen = 0, page_att, page_op, page_template,
+    enum Page{page_gen = 0, page_att, page_op, page_entatt, page_constraint , page_template,
               page_assoc, page_options, page_color, page_font};
 
 protected slots:
--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.cpp #679231:679232
@@ -1104,15 +1104,29 @@
 
     Uml::Object_Type type = object -> getBaseType();
     int page = ClassPropDlg::page_gen;
-    if(type == Uml::ot_Attribute || type == Uml::ot_Operation)
+    if( Model_Utils::isClassifierListitem( type ) )
         object = (UMLObject *)object -> parent();
     //set what page to show
-    if(type == Uml::ot_Attribute)
-        page = ClassPropDlg::page_att;
-    else if(type == Uml::ot_Operation)
-        page = ClassPropDlg::page_op;
-    //FIXME for entityattributes
+    switch( type ) {
 
+       case Uml::ot_Attribute:
+         page = ClassPropDlg::page_att;
+         break;
+       case Uml::ot_Operation:
+         page = ClassPropDlg::page_op;
+         break;
+       case Uml::ot_EntityAttribute:
+         page = ClassPropDlg::page_entatt;
+         break;
+       case Uml::ot_UniqueConstraint:
+       case Uml::ot_ForeignKeyConstraint:
+         page = ClassPropDlg::page_constraint;
+         break;
+       default:
+         page = ClassPropDlg::page_gen;
+         break;
+    }
+
     if(object)
         object->showProperties(page);
     item -> cancelRename( 0 );//double click can cause it to go into rename mode.




More information about the umbrello-devel mailing list