Bug 107551: Cannot drag members from classifier another (normal)
Opened:2005-06-16 20:01
Product:umbrello
Component:general
Version:1.3.2
Status:RESOLVED
Platform:unspecified
Resolution:FIXED
Reporter:hevi lut fi
Assigned to:Oliver Kellogg

Version:           1.3.2 (using KDE 3.3.2,  (3.1))
Compiler:          gcc version 3.3.6 (Debian 1:3.3.6-5)
OS:                Linux (i686) release 2.6.11-1-686

Cannot drag members of the certain classifier (class/interface) to the
another classifier in model view.


------- Additional Comment #1 From Oliver Kellogg 2005-06-18 10:37 -------
SVN commit 426709 by okellogg:

Implement listview drag/drop of attributes and operations.
The update of the model objects is still missing.
CCBUG:107551


 M  +21 -1     umllistview.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/umllistview.cpp #426708:426709
 at  at  -836,7 +836,8  at  at
  while((item=it.current()) != 0) {
  ++it;
  Uml::ListView_Type type = item->getType();
- if ( !typeIsCanvasWidget(type) && !typeIsDiagram(type) && !typeIsFolder(type) ) {
+ if ( !typeIsCanvasWidget(type) && !typeIsDiagram(type) && !typeIsFolder(type)
+      && type != Uml::lvt_Attribute && type != Uml::lvt_Operation) {
  return 0;
  }
  list.append(item);
 at  at  -1087,6 +1088,17  at  at
  accept = (dstType == Uml::lvt_Logical_Folder);
  }
  break;
+ case Uml::lvt_Attribute:
+ if (dstType == Uml::lvt_Class) {
+ accept = !item->isOwnParent(data->id);
+ }
+ break;
+ case Uml::lvt_Operation:
+ if (dstType == Uml::lvt_Class ||
+     dstType == Uml::lvt_Interface) {
+ accept = !item->isOwnParent(data->id);
+ }
+ break;
  case Uml::lvt_Datatype:
  accept = (dstType == Uml::lvt_Logical_Folder ||
    dstType == Uml::lvt_Datatype_Folder ||
 at  at  -1254,6 +1266,14  at  at
  m_doc->getCurrentView()->updateContainment(o);
  }
  break;
+ case Uml::lvt_Attribute:
+ case Uml::lvt_Operation:
+ if (newParentType == Uml::lvt_Class ||
+     newParentType == Uml::lvt_Interface) {
+ newItem = move->deepCopy(newParent);
+ delete move;
+ }
+ break;
  default:
  break;
  }


------- Additional Comment #2 From Oliver Kellogg 2005-06-19 11:26 -------
SVN commit 427031 by okellogg:

moveObject(): Update the model objects after a drop.
BUG:107551


 M  +2 -2      ChangeLog  
 M  +68 -1     umbrello/umllistview.cpp  
 M  +1 -1      umbrello/umllistview.h  


Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments:


View Bug Activity   |   Format For Printing


Attachment Type Modified Status Actions
Create a New Attachment (proposed patch, testcase, etc.) View All


Actions: Query | Reports Search:   New Account | Log In