[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sun Mar 21 13:02:13 UTC 2004


CVS commit by okellogg: 

deleteContents: Setting m_bLoading avoids undue calls to addToUndoStack().


  M +8 -1      umldoc.cpp   1.129


--- kdesdk/umbrello/umbrello/umldoc.cpp  #1.128:1.129
@@ -381,4 +381,12 @@ void UMLDoc::deleteContents() {
         if (listView) {
                 listView->init();
+                m_bLoading = true; // This is to prevent document becoming modified.
+                // For reference, here is an example of a call sequence that would
+                // otherwise result in futile addToUndoStack() calls:
+                //  removeAllViews()  =>
+                //   UMLView::removeAllAssociations()  =>
+                //    UMLView::removeAssoc()  =>
+                //     UMLDoc::setModified(true, true)  =>
+                //      addToUndoStack().
                 removeAllViews();
                 if(objectList.count() > 0) {






More information about the umbrello-devel mailing list