Index: docviewman.cpp
===================================================================
RCS file: /home/kde/kdevelop/kdevelop/docviewman.cpp,v
retrieving revision 1.1.2.85.2.25
diff -u -r1.1.2.85.2.25 docviewman.cpp
--- docviewman.cpp	2002/03/05 14:23:07	1.1.2.85.2.25
+++ docviewman.cpp	2002/04/19 14:06:43
@@ -822,7 +822,11 @@
     if (pChild->isWidgetType()) {
       pView = (QWidget*) pChild;
       if (CEditWidget* pEditView = dynamic_cast<CEditWidget*> (pView)) {
-        if (checkAndSaveFileOfCurrentEditView(true, pEditView) != KMessageBox::Cancel) {
+        bool bOld = m_bCloseActionPending;
+        m_bCloseActionPending = true;
+        int result = checkAndSaveFileOfCurrentEditView(true, pEditView);
+        m_bCloseActionPending = bOld;
+        if ( result != KMessageBox::Cancel) {
           closeEditView(pEditView);
           return true;
         }
@@ -1308,9 +1312,13 @@
 #ifdef WITH_CPP_REPARSE
   if (m_pParent->hasProject())
 #else
-    if (m_pParent->hasProject() && getKWriteDocType(m_pCurEditDoc) == CPP_HEADER)
+  if (m_pParent->hasProject() && getKWriteDocType(m_pCurEditDoc) == CPP_HEADER)
 #endif
-       m_pParent->refreshClassViewByFileList(&lSavedFile);
+  {
+    if (!m_bCloseActionPending) {
+      m_pParent->refreshClassViewByFileList(&lSavedFile);
+    }
+  }
   return KMessageBox::Yes;
 }
 
@@ -1392,9 +1400,9 @@
 
   pProgressBar->reset();
 
-  if (m_pParent->hasProject() && !iFileList.isEmpty() && mod)
+  if (m_pParent->hasProject() && !iFileList.isEmpty() && mod && !m_bCloseActionPending) {
     m_pParent->refreshClassViewByFileList(&iFileList);
-
+  }
 }
 
 void DocViewMan::reloadModifiedFiles()
