OSDN Git Service

PushDlg: Fix: Wrong remote selected after selection via ref-browser.
[tortoisegit/TortoiseGitJp.git] / src / Utils / MiscUI / HistoryCombo.cpp
index ce82cd1..9040a5f 100644 (file)
@@ -152,6 +152,8 @@ int CHistoryCombo::AddString(CString str, INT_PTR pos)
        {\r
                DeleteItem(nIndex);\r
                m_arEntries.RemoveAt(nIndex);\r
+               //nRet is now (potentially) invalid. Reset it.\r
+               nRet = FindStringExact(0, str);\r
        }\r
 \r
        //truncate list to m_nMaxHistoryItems\r