OSDN Git Service

CreateBranchTag: Enable track option when creating a branch based on a remote
authorJohan 't Hart <johanthart@gmail.com>
Sun, 10 May 2009 21:00:58 +0000 (23:00 +0200)
committerFrank Li <lznuaa@gmail.com>
Thu, 14 May 2009 15:22:18 +0000 (23:22 +0800)
src/TortoiseProc/CreateBranchTagDlg.cpp

index d7b56f1..ea8cbc8 100644 (file)
@@ -90,6 +90,8 @@ BOOL CCreateBranchTagDlg::OnInitDialog()
        pHead->GetWindowText( HeadText ); \r
        pHead->SetWindowText( HeadText + " (" + g_Git.GetCurrentBranch() + ")");\r
        EnableSaveRestore(_T("BranchTagDlg"));\r
        pHead->GetWindowText( HeadText ); \r
        pHead->SetWindowText( HeadText + " (" + g_Git.GetCurrentBranch() + ")");\r
        EnableSaveRestore(_T("BranchTagDlg"));\r
+\r
+       OnCbnSelchangeComboboxexBranch();\r
        return TRUE;\r
 \r
 \r
        return TRUE;\r
 \r
 \r
@@ -115,7 +117,7 @@ void CCreateBranchTagDlg::OnCbnSelchangeComboboxexBranch()
 {\r
        // TODO: Add your control notification handler code here\r
        \r
 {\r
        // TODO: Add your control notification handler code here\r
        \r
-       if(this->m_ChooseVersioinBranch.GetString().Left(6)==_T("origin"))\r
+       if(this->m_ChooseVersioinBranch.GetString().Left(8)==_T("remotes/"))\r
                this->GetDlgItem(IDC_CHECK_TRACK)->EnableWindow(TRUE);\r
        else\r
                this->GetDlgItem(IDC_CHECK_TRACK)->EnableWindow(FALSE);\r
                this->GetDlgItem(IDC_CHECK_TRACK)->EnableWindow(TRUE);\r
        else\r
                this->GetDlgItem(IDC_CHECK_TRACK)->EnableWindow(FALSE);\r