OSDN Git Service

Fixed issue #187: Allow start new rebase after finish rebase
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / RebaseDlg.cpp
index 3f4e18b..0e6d8eb 100644 (file)
@@ -44,7 +44,7 @@ void CRebaseDlg::DoDataExchange(CDataExchange* pDX)
        DDX_Control(pDX,IDC_REBASE_COMBOXEX_BRANCH, this->m_BranchCtrl);\r
        DDX_Control(pDX,IDC_REBASE_COMBOXEX_UPSTREAM,   this->m_UpstreamCtrl);\r
        DDX_Check(pDX, IDC_REBASE_CHECK_FORCE,m_bForce);\r
-\r
+       DDX_Control(pDX,IDC_REBASE_POST_BUTTON,m_PostButton);\r
 }\r
 \r
 \r
@@ -312,6 +312,7 @@ void CRebaseDlg::DoSize(int delta)
        CSplitterControl::ChangePos(GetDlgItem(IDC_SQUASH_ALL),0,delta);\r
        CSplitterControl::ChangePos(GetDlgItem(IDC_PICK_ALL),0,delta);\r
        CSplitterControl::ChangePos(GetDlgItem(IDC_EDIT_ALL),0,delta);\r
+       CSplitterControl::ChangePos(GetDlgItem(IDC_REBASE_CHECK_FORCE),0,delta);\r
        \r
        this->AddRebaseAnchor();\r
        // adjust the minimum size of the dialog to prevent the resizing from\r
@@ -979,10 +980,12 @@ void CRebaseDlg::SetControlEnable()
                this->GetDlgItem(IDC_PICK_ALL)->EnableWindow(TRUE);\r
                this->GetDlgItem(IDC_EDIT_ALL)->EnableWindow(TRUE);\r
                this->GetDlgItem(IDC_SQUASH_ALL)->EnableWindow(TRUE);\r
+               \r
                if(!m_IsCherryPick)\r
                {\r
                        this->GetDlgItem(IDC_REBASE_COMBOXEX_BRANCH)->EnableWindow(TRUE);\r
                        this->GetDlgItem(IDC_REBASE_COMBOXEX_UPSTREAM)->EnableWindow(TRUE);\r
+                       this->GetDlgItem(IDC_REBASE_CHECK_FORCE)->EnableWindow(TRUE);                   \r
                }\r
                //this->m_CommitList.m_IsEnableRebaseMenu=TRUE;\r
                this->m_CommitList.m_ContextMenuMask |= m_CommitList.GetContextMenuBit(CGitLogListBase::ID_REBASE_PICK)|\r
@@ -1004,17 +1007,20 @@ void CRebaseDlg::SetControlEnable()
                this->GetDlgItem(IDC_SQUASH_ALL)->EnableWindow(FALSE);\r
                this->GetDlgItem(IDC_REBASE_COMBOXEX_BRANCH)->EnableWindow(FALSE);\r
                this->GetDlgItem(IDC_REBASE_COMBOXEX_UPSTREAM)->EnableWindow(FALSE);\r
+               this->GetDlgItem(IDC_REBASE_CHECK_FORCE)->EnableWindow(FALSE);\r
                //this->m_CommitList.m_IsEnableRebaseMenu=FALSE;\r
                this->m_CommitList.m_ContextMenuMask &= ~(m_CommitList.GetContextMenuBit(CGitLogListBase::ID_REBASE_PICK)|\r
                                                                                                m_CommitList.GetContextMenuBit(CGitLogListBase::ID_REBASE_SQUASH)|\r
                                                                                                m_CommitList.GetContextMenuBit(CGitLogListBase::ID_REBASE_EDIT)|\r
                                                                                                m_CommitList.GetContextMenuBit(CGitLogListBase::ID_REBASE_SKIP));\r
 \r
-               if( m_RebaseStage == REBASE_DONE && (!this->m_PostButtonText.IsEmpty()) )\r
+               if( m_RebaseStage == REBASE_DONE && (this->m_PostButtonTexts.GetCount() != 0) )\r
                {\r
                        this->GetDlgItem(IDC_STATUS_STATIC)->ShowWindow(SW_HIDE);\r
                        this->GetDlgItem(IDC_REBASE_POST_BUTTON)->ShowWindow(SW_SHOWNORMAL);\r
-                       this->GetDlgItem(IDC_REBASE_POST_BUTTON)->SetWindowText(this->m_PostButtonText);\r
+                       this->m_PostButton.RemoveAll();\r
+                       this->m_PostButton.AddEntries(m_PostButtonTexts);\r
+                       //this->GetDlgItem(IDC_REBASE_POST_BUTTON)->SetWindowText(this->m_PostButtonText);\r
                }\r
                break;\r
        }\r