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

Jonathan Riddell jri at jriddell.org
Sat Mar 27 11:45:01 UTC 2004


CVS commit by jriddell: 

Backport commit from Sun Mar 21 21:02:44 2004
--
CVS commit by okellogg:

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


  M +8 -1      umldoc.cpp   1.122.2.5


--- kdesdk/umbrello/umbrello/umldoc.cpp  #1.122.2.4:1.122.2.5
@@ -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