Fix a tab settings regression

Tab settings per language broken due to the entries are doubled by error
during the preferences dialog reorganization.
This commit is contained in:
Don Ho 2016-10-30 01:02:32 +02:00
parent 1b66acd5e9
commit 2897dee54a

View File

@ -1534,12 +1534,6 @@ INT_PTR CALLBACK LangMenuDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
// //
// Lang Menu // Lang Menu
// //
const int nbLang = pNppParam->getNbLang();
for (int i = 0 ; i < nbLang ; ++i)
{
::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(pNppParam->getLangFromIndex(i)->_langName.c_str()));
}
for (int i = L_TEXT ; i < pNppParam->L_END ; ++i) for (int i = L_TEXT ; i < pNppParam->L_END ; ++i)
{ {
generic_string str; generic_string str;
@ -1578,6 +1572,7 @@ INT_PTR CALLBACK LangMenuDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
::SendDlgItemMessage(_hSelf, IDC_CHECK_REPLACEBYSPACE, BM_SETCHECK, nppGUI._tabReplacedBySpace, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_REPLACEBYSPACE, BM_SETCHECK, nppGUI._tabReplacedBySpace, 0);
::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TEXT("[Default]"))); ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TEXT("[Default]")));
const int nbLang = pNppParam->getNbLang();
for (int i = 0; i < nbLang; ++i) for (int i = 0; i < nbLang; ++i)
{ {
::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(pNppParam->getLangFromIndex(i)->_langName.c_str())); ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(pNppParam->getLangFromIndex(i)->_langName.c_str()));