From 4bc5c806c7c48a20d31a39e631601fdd04a51dfe Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 12 Jul 2024 12:56:11 +0300 Subject: viewer#1990 Fixed "Main dictionary" option is switching to the previous value --- indra/newview/llfloaterspellchecksettings.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterspellchecksettings.cpp') diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 735776f7e5..e58e819345 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -67,7 +67,11 @@ bool LLFloaterSpellCheckerSettings::postBuild(void) LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange, this)); getChild("spellcheck_remove_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnRemove, this)); getChild("spellcheck_import_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnImport, this)); - getChild("spellcheck_main_combo")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false)); + getChild("spellcheck_main_combo")->setCommitCallback([this](LLUICtrl* ctrl, const LLSD& data) + { + mMainSelectionChanged = true; + refreshDictionaries(false); + }); getChild("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_active_list", "spellcheck_available_list")); getChild("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_available_list", "spellcheck_active_list")); center(); @@ -146,7 +150,7 @@ void LLFloaterSpellCheckerSettings::onBtnRemove() void LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange() { - refreshDictionaries(true); + refreshDictionaries(!mMainSelectionChanged); } void LLFloaterSpellCheckerSettings::refreshDictionaries(bool from_settings) -- cgit v1.2.3