From 2897dee54a8d265f588bafc1ca14fec06bba3ccd Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sun, 30 Oct 2016 01:02:32 +0200 Subject: [PATCH] Fix a tab settings regression Tab settings per language broken due to the entries are doubled by error during the preferences dialog reorganization. --- PowerEditor/src/WinControls/Preference/preferenceDlg.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index 5bec6e1c7..d96dd696d 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -1534,12 +1534,6 @@ INT_PTR CALLBACK LangMenuDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP // // Lang Menu // - const int nbLang = pNppParam->getNbLang(); - for (int i = 0 ; i < nbLang ; ++i) - { - ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast(pNppParam->getLangFromIndex(i)->_langName.c_str())); - } - for (int i = L_TEXT ; i < pNppParam->L_END ; ++i) { 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_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast(TEXT("[Default]"))); + const int nbLang = pNppParam->getNbLang(); for (int i = 0; i < nbLang; ++i) { ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast(pNppParam->getLangFromIndex(i)->_langName.c_str()));