From 65267b2225b894d1c2bcc233b39de204bb9ca098 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Sat, 2 Mar 2013 08:26:34 +0800 Subject: [PATCH] Fixed issue #1677: Clicking "revert" on a file should automatically check the file in the revert dialog Signed-off-by: Sup Yut Sum --- src/Changelog.txt | 1 + src/TortoiseProc/RevertDlg.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/Changelog.txt b/src/Changelog.txt index f62a84368..bfaf0557c 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -17,6 +17,7 @@ Released: unreleased * Fixed issue #832: Compare commits between branches (branch1...branch2, from Reference Browser) * Fixed issue #515: Sort the log window by date * Fixed issue #1676: Automatically check "Make it Bare" when repository path ends in ".git" + * Fixed issue #1677: Clicking "revert" on a file should automatically check the file in the revert dialog == Bug Fixes == * Fixed issue #1642: Incorrect behavior if repo is located on root of drive diff --git a/src/TortoiseProc/RevertDlg.cpp b/src/TortoiseProc/RevertDlg.cpp index eacf4e874..e9a807b45 100644 --- a/src/TortoiseProc/RevertDlg.cpp +++ b/src/TortoiseProc/RevertDlg.cpp @@ -126,6 +126,14 @@ UINT CRevertDlg::RevertThread() // do not select all files, only the ones the user has selected directly GITSLC_SHOWDIRECTFILES|GITSLC_SHOWADDED); + for (int i = 0; i < m_RevertList.GetItemCount(); ++i) + { + CTGitPath *path = (CTGitPath *)m_RevertList.GetItemData(i); + for (int j = 0; j < m_pathList.GetCount(); ++j) + if (m_pathList[j].GetGitPathString() == path->GetGitPathString()) + m_RevertList.SetCheck(i, TRUE); + } + if (m_RevertList.HasUnversionedItems()) { if (DWORD(CRegStdDWORD(_T("Software\\TortoiseGit\\UnversionedAsModified"), FALSE))) -- 2.11.4.GIT