OSDN Git Service

Fix don't using cache bug and disable filter when fetch log
authorFrank Li <lznuaa@gmail.com>
Thu, 14 Jan 2010 06:15:18 +0000 (14:15 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 14 Jan 2010 06:15:18 +0000 (14:15 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/GitLogCache.cpp
src/TortoiseProc/GitLogListBase.cpp
src/TortoiseProc/LogDlg.cpp

index 5939877..7028d06 100644 (file)
@@ -34,7 +34,7 @@ GitRev * CLogCache::GetCacheData(CGitHash &hash)
                if(!LoadOneItem(rev,m_HashMapIndex[hash]))\r
                {\r
                        m_HashMap[hash].CopyFrom(rev);\r
-                       rev.m_IsFull=true;\r
+                       m_HashMap[hash].m_IsFull=true;\r
                        \r
                        return &m_HashMap[hash];\r
                }\r
index bedac59..c0506fc 100644 (file)
@@ -2125,7 +2125,7 @@ UINT CGitLogListBase::LogThread()
                m_arShownList.Add(pRev);\r
                this->m_critSec.Unlock();\r
 \r
-               if(t2-t1>500 )\r
+               if(t2-t1>500 || (m_logEntries.size()-oldsize >100))\r
                {\r
                        //update UI\r
                        int percent=m_logEntries.size()*100/total + GITLOG_START+1;\r
index c693349..734f036 100644 (file)
@@ -365,9 +365,13 @@ LRESULT CLogDlg::OnLogListLoading(WPARAM wParam, LPARAM /*lParam*/)
                //DialogEnableWindow(IDC_SHOWWHOLEPROJECT, FALSE);\r
                //DialogEnableWindow(IDC_LOG_FIRSTPARENT, FALSE);\r
                DialogEnableWindow(IDC_STATBUTTON, FALSE);\r
-               DialogEnableWindow(IDC_REFRESH, FALSE);\r
+               //DialogEnableWindow(IDC_REFRESH, FALSE);\r
                DialogEnableWindow(IDC_HIDEPATHS,FALSE);\r
-               \r
+\r
+               DialogEnableWindow(IDC_DATEFROM,FALSE);\r
+               DialogEnableWindow(IDC_DATETO,FALSE);\r
+\r
+               DialogEnableWindow(IDC_SEARCHEDIT,FALSE);\r
 \r
        }else if( cur == GITLOG_END)\r
        {\r
@@ -389,6 +393,11 @@ LRESULT CLogDlg::OnLogListLoading(WPARAM wParam, LPARAM /*lParam*/)
                DialogEnableWindow(IDC_REFRESH, TRUE);\r
                DialogEnableWindow(IDC_HIDEPATHS,TRUE);\r
 \r
+               DialogEnableWindow(IDC_DATEFROM,TRUE);\r
+               DialogEnableWindow(IDC_DATETO,TRUE);\r
+\r
+               DialogEnableWindow(IDC_SEARCHEDIT,TRUE);\r
+\r
 //             PostMessage(WM_TIMER, LOGFILTER_TIMER);\r
                GetDlgItem(IDC_PROGRESS)->ShowWindow(FALSE);\r
                //CTime time=m_LogList.GetOldestTime();\r