[Uml-devel] kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Tue Jan 25 09:41:04 UTC 2005


CVS commit by okellogg: 

BUG:69592 - allow interfaces as Object canvas items


  M +2 -2      ChangeLog   1.60
  M +14 -5     umbrello/umlview.cpp   1.204


--- kdesdk/umbrello/ChangeLog  #1.59:1.60
@@ -17,5 +17,5 @@
 * Bugs fixed / wishes implemented (see http://bugs.kde.org)
 53380 53384 54928 55058 55242 57879       61945 62321 63316
-67062 67723       71978 74249 74952 75010 77645       80405
+67062 67723 69592 71978 74249 74952 75010 77645       80405
 80559 82342 85377 86083 86828 86952 86958 87111 87537 87956
 87995 88152 88245 88415 88954 89334 89485 89553 89563 89579
@@ -24,5 +24,5 @@
 92781 92995 93122 93219 93297 93298 93501 93595 93696 94173
 94728 94795 94883 95082 95247 95252 95722 95924 95951 95954
-96216 96221
+96216 96221 96964 97155 97182 97697
 
 Version 1.3

--- kdesdk/umbrello/umbrello/umlview.cpp  #1.203:1.204
@@ -485,10 +485,18 @@ void UMLView::slotObjectCreated(UMLObjec
                 newWidget = new EntityWidget(this, static_cast<UMLEntity*>(o));
         } else if(type == ot_Interface) {
-                InterfaceWidget* interfaceWidget = new InterfaceWidget(this, static_cast<UMLInterface*>(o));
                 Diagram_Type diagramType = getType();
+                if (diagramType == dt_Sequence || diagramType == dt_Collaboration) {
+                        ObjectWidget *ow = new ObjectWidget(this, o, getLocalID() );
+                        if (m_Type == dt_Sequence) {
+                                y = ow->topMargin();
+                        }
+                        newWidget = ow;
+                } else {
+                        InterfaceWidget* interfaceWidget = new InterfaceWidget(this, static_cast<UMLInterface*>(o));
                 if (diagramType == dt_Component || diagramType == dt_Deployment) {
                         interfaceWidget->setDrawAsCircle(true);
                 }
                 newWidget = interfaceWidget;
+                }
         } else if(type == ot_Class ) { // CORRECT?
                 //see if we really want an object widget or class widget
@@ -604,5 +612,5 @@ void UMLView::contentsDragEnterEvent(QDr
         }
         if((diagramType == dt_Sequence || diagramType == dt_Collaboration) &&
-           ot != ot_Class && ot != ot_Actor) {
+           ot != ot_Class && ot != ot_Interface && ot != ot_Actor) {
                 e->accept(false);
                 return;
@@ -1500,4 +1508,5 @@ UMLObjectList* UMLView::getUMLObjects() 
                         case wt_Actor:
                         case wt_Class:
+                        case wt_Interface:
                         case wt_Package:
                         case wt_Component:






More information about the umbrello-devel mailing list