OSDN Git Service

Fixed issue #150: When pushing, 'remote' should default to the tracked branch, or...
authorFrank Li <lznuaa@gmail.com>
Fri, 28 Aug 2009 13:50:44 +0000 (21:50 +0800)
committerFrank Li <lznuaa@gmail.com>
Fri, 28 Aug 2009 13:50:44 +0000 (21:50 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/BranchCombox.h
src/TortoiseProc/PushDlg.cpp

index d1d9339..14b1015 100644 (file)
@@ -55,9 +55,10 @@ protected:
                {\r
                        m_ctrlRemoteBranch.AddString(pullBranch);\r
                }\r
                {\r
                        m_ctrlRemoteBranch.AddString(pullBranch);\r
                }\r
-               else if(!this->m_RegKeyRemoteBranch.IsEmpty())\r
+               //else if(!this->m_RegKeyRemoteBranch.IsEmpty())\r
+               else\r
                {\r
                {\r
-                       m_ctrlRemoteBranch.AddString(currentBranch);\r
+                       m_ctrlRemoteBranch.SetCurSel(-1);\r
                }\r
                \r
                this->AddBranchToolTips(&this->m_ctrlLocalBranch,this->m_pTooltip);\r
                }\r
                \r
                this->AddBranchToolTips(&this->m_ctrlLocalBranch,this->m_pTooltip);\r
index 48291a3..22557d0 100644 (file)
@@ -170,9 +170,12 @@ void CPushDlg::Refresh()
 \r
        m_BranchRemote.LoadHistory(CString(_T("Software\\TortoiseGit\\History\\RemoteBranch\\"))+WorkingDir, _T("branch"));\r
        if( !pushBranch.IsEmpty() )\r
 \r
        m_BranchRemote.LoadHistory(CString(_T("Software\\TortoiseGit\\History\\RemoteBranch\\"))+WorkingDir, _T("branch"));\r
        if( !pushBranch.IsEmpty() )\r
+       {\r
                m_BranchRemote.AddString(pushBranch);\r
                m_BranchRemote.AddString(pushBranch);\r
-\r
-       m_BranchRemote.SetCurSel(0);\r
+               m_BranchRemote.SetCurSel(0);    \r
+       }\r
+       else\r
+               m_BranchRemote.SetCurSel(-1);\r
 \r
 }\r
 // CPushDlg message handlers\r
 \r
 }\r
 // CPushDlg message handlers\r