[Uml-devel] kdesdk/umbrello/umbrello
Jonathan Riddell
jri at jriddell.org
Wed Feb 26 09:57:39 UTC 2003
CVS commit by jriddell:
fix bug which caused file format incompatibility with attributes and operations
M +11 -2 umllistview.cpp 1.10
M +5 -0 umllistview.h 1.4
M +2 -2 umlnamespace.h 1.7
--- kdesdk/umbrello/umbrello/umllistview.cpp #1.9:1.10
@@ -403,5 +403,5 @@ QDragObject* UMLListView::dragObject() {
++it;
type = item->getType();
- if((type < Uml::lvt_Actor || type > Uml::lvt_Package) && (type < Uml::lvt_UseCase_Diagram || type > Uml::lvt_Sequence_Diagram) &&
+ if(typeIsCanvasWidget(type) && (type < Uml::lvt_UseCase_Diagram || type > Uml::lvt_Sequence_Diagram) &&
(type != Uml::lvt_UseCase_Folder) && (type != Uml::lvt_Logical_Folder)) {
return 0;
@@ -468,5 +468,5 @@ UMLListViewItem * UMLListView::findUMLOb
return item;
}
- } else if(type >= Uml::lvt_Actor && type <= Uml::lvt_Package) {
+ } else if( typeIsCanvasWidget(type) ) {
if(temp->getUMLObject() == p) {
return temp;
@@ -1896,4 +1896,13 @@ void UMLListView::collapseAll(QListViewI
void UMLListView::setStartedCut(bool startedCut) {
m_bStartedCut = startedCut;
+}
+
+bool UMLListView::typeIsCanvasWidget(ListView_Type type) {
+ if (type == lvt_Actor || type == lvt_UseCase || type == lvt_Class
+ || type == lvt_Package || type == lvt_Interface) {
+ return true;
+ } else {
+ return false;
+ }
}
#include "umllistview.moc"
--- kdesdk/umbrello/umbrello/umllistview.h #1.3:1.4
@@ -273,4 +273,9 @@ protected:
void loadPixmaps();
+ /**
+ * returns true if the listview type is actor, usecase, class, package or interface
+ */
+ bool typeIsCanvasWidget(ListView_Type type);
+
public slots:
void slotDiagramCreated(int id);
--- kdesdk/umbrello/umbrello/umlnamespace.h #1.6:1.7
@@ -126,9 +126,9 @@ namespace Uml {
lvt_UseCase,
lvt_Class,
- lvt_Interface,
- lvt_Package,
lvt_Attribute,
lvt_Operation,
lvt_Template,
+ lvt_Interface,
+ lvt_Package,
lvt_Unknown = -1
};
More information about the umbrello-devel
mailing list