OSDN Git Service

Sync Dialog Scroll the correct line number
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / GitLogListBase.cpp
index 68039f3..af05f00 100644 (file)
@@ -206,7 +206,7 @@ void CGitLogListBase::InsertGitColumn()
 {\r
        CString temp;\r
 \r
-       int c = ((CHeaderCtrl*)(GetDlgItem(0)))->GetItemCount()-1;\r
+       int c = GetHeaderCtrl()->GetItemCount()-1;\r
        \r
        while (c>=0)\r
                DeleteColumn(c--);\r
@@ -873,7 +873,6 @@ void CGitLogListBase::DrawGraph(HDC hdc,CRect &rect,INT_PTR index)
        }\r
 #endif\r
 \r
-       TRACE(_T("index %d %d\r\n"),index,data->m_Lanes.size());\r
 }\r
 \r
 void CGitLogListBase::OnNMCustomdrawLoglist(NMHDR *pNMHDR, LRESULT *pResult)\r
@@ -978,7 +977,14 @@ void CGitLogListBase::OnNMCustomdrawLoglist(NMHDR *pNMHDR, LRESULT *pResult)
                                {\r
                                        CRect rect;\r
                                        GetSubItemRect(pLVCD->nmcd.dwItemSpec, pLVCD->iSubItem, LVIR_BOUNDS, rect);\r
+                                       if(pLVCD->iSubItem == 0)\r
+                                       {\r
+                                               CRect second;\r
+                                               GetSubItemRect(pLVCD->nmcd.dwItemSpec, pLVCD->iSubItem+1, LVIR_BOUNDS, second);\r
+                                               rect.right=second.left;\r
+                                       }\r
                                        \r
+                                       TRACE(_T("A Graphic left %d right %d\r\n"),rect.left,rect.right);\r
                                        FillBackGround(pLVCD->nmcd.hdc, (INT_PTR)pLVCD->nmcd.dwItemSpec,rect);\r
                                        DrawGraph(pLVCD->nmcd.hdc,rect,pLVCD->nmcd.dwItemSpec);\r
 \r
@@ -1035,6 +1041,7 @@ void CGitLogListBase::OnNMCustomdrawLoglist(NMHDR *pNMHDR, LRESULT *pResult)
                                GitRev* pLogEntry = reinterpret_cast<GitRev *>(m_arShownList.GetAt(pLVCD->nmcd.dwItemSpec));\r
                                CRect rect;\r
                                GetSubItemRect(pLVCD->nmcd.dwItemSpec, pLVCD->iSubItem, LVIR_BOUNDS, rect);\r
+                               TRACE(_T("Action left %d right %d\r\n"),rect.left,rect.right);\r
                                // Get the selected state of the\r
                                // item being drawn.                                                    \r
 \r