//blamewidth += m_revwidth;\r
\r
int maxnum=0;\r
- for (unsigned int i=0;i<this->m_Authors.size();i++)\r
+ for (unsigned int i=0;i<this->m_ID.size();i++)\r
{\r
if(m_ID[i]>maxnum)\r
maxnum=m_ID[i];\r
//}\r
\r
CString str;\r
- str.Format(_T("%d"),m_ID[i]);\r
+ if(m_ID[i]>=0)\r
+ str.Format(_T("%d"),m_ID[i]);\r
\r
//_stprintf_s(buf, MAX_PATH, _T("%8ld "), revs[i]);\r
rc.top=Y;\r
line=one.Right(one.GetLength()-start-2);\r
this->m_TextView.InsertText(line,true);\r
}\r
- unsigned int id=pRevs->m_HashMap[one.Left(40)]; \r
- if(id>=0 && id <GetLogData()->size())\r
+ int id;\r
+ if(pRevs->m_HashMap.find(one.Left(40))!=pRevs->m_HashMap.end())\r
+ {\r
+ id=pRevs->m_HashMap[one.Left(40)]; \r
+ }\r
+ else\r
+ id=-1;\r
+\r
+ if(id>=0 && id <(int)GetLogData()->size())\r
{\r
m_ID.push_back(pRevs->size()-id);\r
m_Authors.push_back(pRevs->at(id).m_AuthorName);\r
}else\r
{\r
- ASSERT(FALSE);\r
+ m_ID.push_back(id);\r
+ m_Authors.push_back(one.Left(6));\r
}\r
}\r
\r
// app.m_selecteddate = app.dates[line];\r
\r
\r
- this->GetLogList()->SetItemState(this->GetLogList()->GetItemCount()-m_ID[line],\r
+ if(m_ID[line]>=0)\r
+ {\r
+ this->GetLogList()->SetItemState(this->GetLogList()->GetItemCount()-m_ID[line],\r
LVIS_SELECTED,\r
LVIS_SELECTED);\r
\r
- GitRev *pRev;\r
- pRev=&this->GetLogData()->at(this->GetLogList()->GetItemCount()-m_ID[line]);\r
- this->GetDocument()->GetMainFrame()->m_wndProperties.UpdateProperties(pRev);\r
+ GitRev *pRev;\r
+ pRev=&this->GetLogData()->at(this->GetLogList()->GetItemCount()-m_ID[line]);\r
+ this->GetDocument()->GetMainFrame()->m_wndProperties.UpdateProperties(pRev);\r
+ }else\r
+ {\r
+ this->GetDocument()->GetMainFrame()->m_wndProperties.UpdateProperties(NULL);\r
+ }\r
}\r
else\r
{\r
// app.m_selectedauthor = app.authors[line];\r
// app.m_selecteddate = app.dates[line];\r
\r
- \r
+ if(m_ID[line]<0)\r
+ {\r
+ m_ToolTip.AddTool(this,_T(""));\r
+ return;\r
+ }\r
GitRev *pRev;\r
pRev=&this->GetLogData()->at(this->GetLogList()->GetItemCount()-m_ID[line]);\r
//this->GetDocument()->GetMainFrame()->m_wndProperties.UpdateProperties(pRev);\r