[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Tue Aug 9 22:33:10 UTC 2005
SVN commit 444108 by okellogg:
slotObjectCreated(): Fend off multiple creation of same item.
M +7 -4 umllistview.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistview.cpp #444107:444108
@@ -576,10 +576,13 @@
}
void UMLListView::slotObjectCreated(UMLObject* object) {
- /* kdDebug() << "UMLListView::slotObjectCreated(" << object->getName()
- << "): ID is " << object->getID() << endl;
- */
- UMLListViewItem* newItem = 0;
+ UMLListViewItem* newItem = findUMLObject(object);
+ if (newItem) {
+ kdDebug() << "UMLListView::slotObjectCreated(" << object->getName()
+ << ", id= " << ID2STR(object->getID())
+ << "): item already exists." << endl;
+ return;
+ }
UMLListViewItem* parentItem = 0;
UMLListViewItem* current = (UMLListViewItem*) currentItem();
Uml::Object_Type type = object->getBaseType();
More information about the umbrello-devel
mailing list