From cf7b1a8ce0739b555b6783f77763eba87fc6f00c Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Wed, 30 Mar 2011 17:07:36 +0200 Subject: [PATCH] Fixed issue #766: "Switch/Checkout" dialog: "Track" should be disabled when no new branch is created Signed-off-by: Sven Strickroth --- src/Changelog.txt | 1 + src/TortoiseProc/GitSwitchDlg.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index 08d8bb96c..742e1da99 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -35,6 +35,7 @@ * Fixed issue #749: Ask before delete files. * Fixed issue #125: Export files from revision or range of revisions in "Changes files" dialog. * Fixed issue #512: Git sync lose local commits (remote update, fetch and rebase) + * Fixed issue #766: "Switch/Checkout" dialog: "Track" should be disabled when no new branch is created * TortoiseGitCache Partly rewritten to fix various issues. diff --git a/src/TortoiseProc/GitSwitchDlg.cpp b/src/TortoiseProc/GitSwitchDlg.cpp index 5a8ad7ea2..a71a81f03 100644 --- a/src/TortoiseProc/GitSwitchDlg.cpp +++ b/src/TortoiseProc/GitSwitchDlg.cpp @@ -154,8 +154,8 @@ void CGitSwitchDlg::SetDefaultName(BOOL isUpdateCreateBranch) this->m_bBranch=TRUE; this->m_bTrack=TRUE; - - }else + } + else { m_NewBranch = CString(_T("Branch_"))+this->m_VersionName; this->GetDlgItem(IDC_CHECK_TRACK)->EnableWindow(FALSE); @@ -175,8 +175,11 @@ void CGitSwitchDlg::SetDefaultName(BOOL isUpdateCreateBranch) GetDlgItem(IDC_EDIT_BRANCH)->EnableWindow(m_bBranch); GetDlgItem(IDC_CHECK_BRANCHOVERRIDE)->EnableWindow(m_bBranch); - if (!m_bBranch) { + if (!m_bBranch) + { this->m_bBranchOverride=FALSE; + this->GetDlgItem(IDC_CHECK_TRACK)->EnableWindow(FALSE); + this->m_bTrack=FALSE; } this->UpdateData(FALSE); } -- 2.11.4.GIT