[Uml-devel] kdesdk/umbrello/umbrello/clipboard
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Jul 18 23:28:03 UTC 2004
CVS commit by okellogg:
Start fixing bug 85375.
M +9 -9 umlclipboard.cpp 1.22
M +1 -0 umldrag.cpp 1.22
--- kdesdk/umbrello/umbrello/clipboard/umlclipboard.cpp #1.21:1.22
@@ -233,11 +233,9 @@ void UMLClipboard::setCopyType(UMLListVi
} else if(withDiagrams) {
m_type = clip2;
- } else {
- if(withObjects) {
+ } else if(withObjects) {
m_type = clip1;
} else {
m_type = clip3;
}
- }
}
@@ -368,9 +366,11 @@ bool UMLClipboard::pasteClip1(UMLDoc* do
UMLListViewItemListIt it(itemdatalist);
while ( (itemdata=it.current()) != 0 ) {
- if ( (item = doc->listView->findItem(idchanges->findNewID(itemdata->getID()))) ) {
+ UMLListView *lv = doc->listView;
+ UMLListViewItem *parent = (UMLListViewItem *)lv->currentItem();
+ /*
+ if ( (item = lv->findItem(idchanges->findNewID(itemdata->getID()))) ) {
objectAlreadyExists = true;
- } else {
- item = doc->listView->createItem(*itemdata, *idchanges);
- }
+ } else */
+ item = lv->createItem(*itemdata, *idchanges, parent);
--- kdesdk/umbrello/umbrello/clipboard/umldrag.cpp #1.21:1.22
@@ -348,4 +348,5 @@ bool UMLDrag::decodeClip1(const QMimeSou
return false;
}
+ pObject->setInPaste();
if( !pObject->loadFromXMI( element ) ) {
kdWarning() << "failed to load object from XMI" << endl;
More information about the umbrello-devel
mailing list