OSDN Git Service

Fix: The icons in OpenViews's ComboBox disappeared after clicking OK button
authorsdottaka <sdottaka@sourceforge.net>
Sat, 15 Feb 2014 13:37:48 +0000 (22:37 +0900)
committersdottaka <sdottaka@sourceforge.net>
Sat, 15 Feb 2014 13:37:48 +0000 (22:37 +0900)
--HG--
branch : stable

Src/Common/SuperComboBox.cpp
Src/OpenView.cpp

index bb7d2de..4caf5ce 100644 (file)
@@ -182,12 +182,12 @@ void CSuperComboBox::LoadState(LPCTSTR szRegSubKey, UINT nMaxItems)
        {
                s2.Format(_T("Item_%d"), i);
                s = AfxGetApp()->GetProfileString(szRegSubKey, s2);
-               if (i==0)
-                       SetWindowText(s);
                if (FindStringExact(-1, s) == -1
                        && !s.IsEmpty())
                        AddString(s);
        }
+       if (cnt > 0)
+               SetCurSel(0);
 }
 
 void CSuperComboBox::GetLBText(int nIndex, CString &rString) const
index f432306..002f8cb 100644 (file)
@@ -544,7 +544,7 @@ void COpenView::LoadComboboxStates()
        
        BOOL bIsEmptyThirdItem = theApp.GetProfileInt(_T("Files\\Option"), _T("Empty"), TRUE);
        if (bIsEmptyThirdItem)
-               m_ctlPath[2].SetWindowText(_T(""));     
+               m_ctlPath[2].SetCurSel(-1);
 }
 
 /**