OSDN Git Service

Add Show All branch and Whole Project button at log dialog
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / GitLogListBase.cpp
index 8d1c162..df70d6e 100644 (file)
@@ -87,6 +87,9 @@ CGitLogListBase::CGitLogListBase():CHintListCtrl()
        m_From=CTime(1970,1,2,0,0,0);\r
        m_To=CTime::GetCurrentTime();\r
     m_bAllBranch = FALSE;\r
+       m_LoadingThread = NULL;\r
+\r
+       m_bExitThread=FALSE;\r
 }\r
 \r
 CGitLogListBase::~CGitLogListBase()\r
@@ -1409,10 +1412,11 @@ int CGitLogListBase::FetchLogAsync(CALLBACK_PROCESS *proc,void * data)
 {\r
        m_ProcCallBack=proc;\r
        m_ProcData=data;\r
-\r
+       m_bExitThread=FALSE;\r
        InterlockedExchange(&m_bThreadRunning, TRUE);\r
        InterlockedExchange(&m_bNoDispUpdates, TRUE);\r
-       if (AfxBeginThread(LogThreadEntry, this)==NULL)\r
+       m_LoadingThread = AfxBeginThread(LogThreadEntry, this);\r
+       if (m_LoadingThread ==NULL)\r
        {\r
                InterlockedExchange(&m_bThreadRunning, FALSE);\r
                InterlockedExchange(&m_bNoDispUpdates, FALSE);\r
@@ -1510,6 +1514,9 @@ UINT CGitLogListBase::LogThread()
                        \r
                        if(m_ProcCallBack)\r
                                m_ProcCallBack(m_ProcData,percent);\r
+\r
+                       if(m_bExitThread)\r
+                               break;\r
                }\r
                if(updated==m_logEntries.size())\r
                        break;\r