OSDN Git Service

Add NO_SCROLL when update total size of list number.
authorFrank Li <lznuaa@gmail.com>
Mon, 11 Jan 2010 03:14:45 +0000 (11:14 +0800)
committerFrank Li <lznuaa@gmail.com>
Mon, 11 Jan 2010 03:14:45 +0000 (11:14 +0800)
This will improve user experience.

Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/GitLogListBase.cpp
src/TortoiseProc/LogDlg.cpp

index 58754c7..9416d79 100644 (file)
@@ -2120,13 +2120,13 @@ UINT CGitLogListBase::LogThread()
                {\r
                        //update UI\r
                        oldsize = m_logEntries.size();\r
-                       PostMessage(LVM_SETITEMCOUNT, (WPARAM) this->m_logEntries.size(),(LPARAM) LVSICF_NOINVALIDATEALL);\r
+                       PostMessage(LVM_SETITEMCOUNT, (WPARAM) this->m_logEntries.size(),(LPARAM) LVSICF_NOINVALIDATEALL|LVSICF_NOSCROLL);\r
                        ::PostMessage(this->GetParent()->m_hWnd,MSG_LOAD_PERCENTAGE,(WPARAM) GITLOG_END,0);\r
                }               \r
        }\r
        \r
        //Update UI;\r
-       PostMessage(LVM_SETITEMCOUNT, (WPARAM) this->m_logEntries.size(),(LPARAM) LVSICF_NOINVALIDATEALL);\r
+       PostMessage(LVM_SETITEMCOUNT, (WPARAM) this->m_logEntries.size(),(LPARAM) LVSICF_NOINVALIDATEALL|LVSICF_NOSCROLL);\r
        ::PostMessage(this->GetParent()->m_hWnd,MSG_LOAD_PERCENTAGE,(WPARAM) GITLOG_END,0);\r
 \r
        InterlockedExchange(&m_bThreadRunning, FALSE);\r
index 91404f5..9c29a18 100644 (file)
@@ -375,9 +375,10 @@ LRESULT CLogDlg::OnLogListLoading(WPARAM wParam, LPARAM /*lParam*/)
                if(this->m_LogList.HasText())\r
                {\r
                        this->m_LogList.ClearText();\r
-                       UpdateLogInfoLabel();\r
+                       //UpdateLogInfoLabel();\r
                }\r
 \r
+#if 0\r
                //if (!m_bShowedAll)\r
                DialogEnableWindow(IDC_SHOWWHOLEPROJECT, TRUE);\r
 \r
@@ -394,7 +395,8 @@ LRESULT CLogDlg::OnLogListLoading(WPARAM wParam, LPARAM /*lParam*/)
                m_LogList.GetTimeRange(begin,end);\r
                m_DateFrom.SetTime(&begin);\r
                m_DateTo.SetTime(&end);\r
-               \r
+#endif\r
+\r
        }else\r
        {\r
                if(this->m_LogList.HasText())\r