void CRefLogDlg::OnBnClickedOk()\r
{\r
// TODO: Add your control notification handler code here\r
+ if (m_RefList.GetSelectedCount() == 1)\r
+ {\r
+ // get the selected row\r
+ POSITION pos = m_RefList.GetFirstSelectedItemPosition();\r
+ int selIndex = m_RefList.GetNextSelectedItem(pos);\r
+ if (selIndex < m_RefList.m_arShownList.GetCount())\r
+ {\r
+ // all ok, pick up the revision\r
+ GitRev* pLogEntry = reinterpret_cast<GitRev *>(m_RefList.m_arShownList.GetAt(selIndex));\r
+ // extract the hash\r
+ m_SelectedHash = pLogEntry->m_CommitHash;\r
+ }\r
+ }\r
+\r
OnOK();\r
}\r
\r
CString ref=m_ChooseRef.GetString();\r
if(m_RefList.m_RefMap.find(ref) == m_RefList.m_RefMap.end())\r
{\r
+ m_RefList.m_RefMap[ref].m_pLogCache = &m_RefList.m_LogCache;\r
m_RefList.m_RefMap[ref].ParserFromRefLog(ref);\r
}\r
m_RefList.ClearText();\r
\r
for(unsigned int i=0;i<m_RefList.m_RefMap[ref].size();i++)\r
{\r
- plog->at(i).m_IsFull=TRUE;\r
- this->m_RefList.m_arShownList.Add(&(plog->at(i)));\r
+ plog->GetGitRevAt(i).m_IsFull=TRUE;\r
+ this->m_RefList.m_arShownList.Add(&(plog->GetGitRevAt(i)));\r
\r
}\r
\r