[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Fri Aug 20 13:26:25 UTC 2004


CVS commit by okellogg: 

Constructor: Initialize m_doc. Thanks to Heiko Nardmann for the patch.
slotObjectCreated(), acceptDrag(): Make DataTypes draggable and cut/pastable
 like other classifiers.


  M +13 -4     umllistview.cpp   1.111


--- kdesdk/umbrello/umbrello/umllistview.cpp  #1.110:1.111
@@ -44,5 +44,5 @@
 
 UMLListView::UMLListView(QWidget *parent, const char *name)
-  : KListView(parent,name), m_pMenu(0)
+  : KListView(parent,name), m_pMenu(0), m_doc(0)
 {
         loadPixmaps();
@@ -437,4 +437,5 @@ void UMLListView::slotObjectCreated(UMLO
         case Uml::ot_Enum:
         case Uml::ot_Package:
+        case Uml::ot_Datatype:
         {
                 UMLPackage *pkg = object->getUMLPackage();
@@ -456,11 +457,10 @@ void UMLListView::slotObjectCreated(UMLO
                 } else if (lvt == Uml::lvt_Logical_Folder)
                         parentItem = current;
+                else if (type == Uml::ot_Datatype)
+                        parentItem = datatypeFolder;
                 else
                         parentItem = lv;
         }
                 break;
-        case Uml::ot_Datatype:
-                parentItem = datatypeFolder;
-                break;
         case Uml::ot_Actor:
         case Uml::ot_UseCase:
@@ -901,4 +901,11 @@ bool UMLListView::acceptDrag(QDropEvent*
                                           dstType == Uml::lvt_Package);
                                 break;
+                        case Uml::lvt_Datatype:
+                                accept = (dstType == Uml::lvt_Logical_Folder ||
+                                          dstType == Uml::lvt_Datatype_Folder ||
+                                          dstType == Uml::lvt_Class ||
+                                          dstType == Uml::lvt_Interface ||
+                                          dstType == Uml::lvt_Package);
+                                break;
                         case Uml::lvt_Class_Diagram:
                         case Uml::lvt_Collaboration_Diagram:
@@ -1003,5 +1010,7 @@ UMLListViewItem * UMLListView::moveObjec
                 case Uml::lvt_Interface:
                 case Uml::lvt_Enum:
+                case Uml::lvt_Datatype:
                         if (newParentType == Uml::lvt_Logical_Folder ||
+                            newParentType == Uml::lvt_Datatype_Folder ||
                             newParentType == Uml::lvt_Logical_View ||
                             newParentType == Uml::lvt_Class ||






More information about the umbrello-devel mailing list