OSDN Git Service

BUG: [ 828619 ] Prevent closing dir doc whilst scanning
authorPerry Rapp <elsapo@users.sourceforge.net>
Thu, 23 Oct 2003 15:52:42 +0000 (15:52 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Thu, 23 Oct 2003 15:52:42 +0000 (15:52 +0000)
Src/DirDoc.cpp
Src/DirDoc.h
Src/readme.txt

index 382e15a..0287ebb 100644 (file)
@@ -740,3 +740,15 @@ void CDirDoc::UpdateHeaderPath(BOOL bLeft)
 
        pf->GetHeaderInterface()->SetText(nPane, sText);
 }
+
+/**
+ * @brief virtual override called just before document is saved and closed
+ */
+BOOL CDirDoc::SaveModified() 
+{
+       // Do not allow closing if there is a thread running
+       if (m_diffThread.GetThreadState() == THREAD_COMPARING)
+               return FALSE;
+       
+       return CDocument::SaveModified();
+}
\ No newline at end of file
index bd386a6..293bb43 100644 (file)
@@ -77,6 +77,7 @@ public:
        virtual void Serialize(CArchive& ar);   // overridden for document i/o
        protected:
        virtual BOOL OnNewDocument();
+       virtual BOOL SaveModified();
        //}}AFX_VIRTUAL
 
 // Implementation
index 98f31fb..36c3f7c 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-23 Perry
+ BUG: [ 828619 ] Prevent closing dir doc whilst scanning
+  WinMerge: DirDoc.cpp DirDoc.h
+
 2003-10-23 Kimmo
  BUG: [ 815147 ] Scrollwheel scrolls too far at end of file
   editlib: ccrystaltextview.cpp