[Uml-devel] KDE_3_4_BRANCH: kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Fri Mar 18 17:21:06 UTC 2005


CVS commit by okellogg: 

Backport fix for bug 101148 (performance issue with large models.)


  M +7 -3      umllistview.cpp   1.146.2.3
  M +4 -1      umlobject.cpp   1.69.2.2
  M +5 -0      umlobject.h   1.49.2.2


--- kdesdk/umbrello/umbrello/umllistview.cpp  #1.146.2.2:1.146.2.3
@@ -600,4 +600,6 @@ void UMLListView::slotObjectCreated(UMLO
         connectNewObjectsSlots(object);
         newItem = new UMLListViewItem(parentItem, object->getName(), convert_OT_LVT(type), object);
+        if (m_doc->loading())
+                return;
         ensureItemVisible(newItem);
         newItem->setOpen(true);
@@ -689,8 +691,10 @@ void UMLListView::childObjectAdded(UMLOb
                 UMLListViewItem *newItem = new UMLListViewItem(parentItem, text,
                                                                convert_OT_LVT(obj->getBaseType()), obj);
+                if (! m_doc->loading()) {
                 ensureItemVisible(newItem);
                 clearSelection();
                 setSelected(newItem, true);
         }
+        }
         connectNewObjectsSlots(obj);
 }

--- kdesdk/umbrello/umbrello/umlobject.cpp  #1.69.2.1:1.69.2.2
@@ -63,4 +63,5 @@ void UMLObject::init() {
         m_bStatic = false;
         m_bInPaste = false;
+        m_bCreationWasSignalled = false;
         m_pSecondary = NULL;
 }
@@ -328,9 +329,11 @@ QString UMLObject::getSecondaryId() cons
 
 void UMLObject::maybeSignalObjectCreated() {
-        if (m_BaseType != Uml::ot_Stereotype &&
+        if (!m_bCreationWasSignalled &&
+            m_BaseType != Uml::ot_Stereotype &&
             m_BaseType != Uml::ot_Association &&
             m_BaseType != Uml::ot_Role) {
                 UMLDoc* umldoc = UMLApp::app()->getDocument();
                 umldoc->signalUMLObjectCreated(this);
+                m_bCreationWasSignalled = true;
         }
 }

--- kdesdk/umbrello/umbrello/umlobject.h  #1.49.2.1:1.49.2.2
@@ -414,4 +414,9 @@ protected:
 
         /**
+         * Auxiliary to maybeSignalObjectCreated().
+         */
+        bool m_bCreationWasSignalled;
+
+        /**
          * Pointer to an associated object.
          * Only a few of the classes inheriting from UMLObject use this.






More information about the umbrello-devel mailing list