Bug 107551 - Cannot drag members from classifier another
Summary: Cannot drag members from classifier another
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 1.3.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Oliver Kellogg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-16 20:01 UTC by hevi
Modified: 2005-06-19 11:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hevi 2005-06-16 20:01:10 UTC
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.
Comment 1 Oliver Kellogg 2005-06-18 10:37:10 UTC
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
@@ -836,7 +836,8 @@
 	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);
@@ -1087,6 +1088,17 @@
 					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 ||
@@ -1254,6 +1266,14 @@
 				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;
 	}
Comment 2 Oliver Kellogg 2005-06-19 11:26:23 UTC
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