From: Frank Li Date: Fri, 24 Apr 2009 03:19:28 +0000 (+0800) Subject: Issue 74: Add multiple files from commit dialog only adds first two in multi-selection X-Git-Url: http://git.sourceforge.jp/view?p=tortoisegit%2FTortoiseGitJp.git;a=commitdiff_plain;h=e8207826ed3de8d4968df38f65e3b8db1d328675;hp=9520cbe960cef0186f726273875eafd6e46be90e Issue 74: Add multiple files from commit dialog only adds first two in multi-selection Signed-off-by: Frank Li --- diff --git a/src/Git/GitStatusListCtrl.cpp b/src/Git/GitStatusListCtrl.cpp index 4521750..7260bc6 100644 --- a/src/Git/GitStatusListCtrl.cpp +++ b/src/Git/GitStatusListCtrl.cpp @@ -2683,10 +2683,18 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point) case IDSVNLC_ADD: { // The add went ok, but we now need to run through the selected items again // and update their status + std::vector selectIndex; + POSITION pos = GetFirstSelectedItemPosition(); int index; while ((index = GetNextSelectedItem(pos)) >= 0) { + selectIndex.push_back(index); + } + for(int i=0;iGetGitPathString()==targetList[i].GetGitPathString()) { - RemoveListEntry(nItem); + if(path->m_Action & CTGitPath::LOGACTIONS_ADDED) + { + path->m_Action = CTGitPath::LOGACTIONS_UNVER; + SetEntryCheck(path,nItem,false); + SetItemGroup(nItem,1); + this->m_StatusFileList.RemoveItem(*path); + this->m_UnRevFileList.AddPath(*path); + //this->m_IgnoreFileList.RemoveItem(*path); + + }else + { + RemoveListEntry(nItem); + } break; } }