diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 293b6750e6..90a08c7927 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -611,9 +611,11 @@ BOOL LLFloaterPreference::postBuild() gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this)); - LLTabContainer* tabcontainer = getChild("pref core"); - if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) - tabcontainer->selectFirstTab(); + // Preferences search + //LLTabContainer* tabcontainer = getChild("pref core"); + //if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) + // tabcontainer->selectFirstTab(); + // getChild("cache_location")->setEnabled(FALSE); // make it read-only but selectable (STORM-227) getChildView("log_path_string")->setEnabled(FALSE);// do the same for chat logs path @@ -1092,6 +1094,9 @@ void LLFloaterPreference::onOpen(const LLSD& key) mFilterEdit->setText(LLStringExplicit("")); collectSearchableItems(); onUpdateFilterTerm(true); + + if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) + tabcontainer->selectFirstTab(); // } @@ -1167,7 +1172,13 @@ void LLFloaterPreference::setHardwareDefaults() //virtual void LLFloaterPreference::onClose(bool app_quitting) { - gSavedSettings.setS32("LastPrefTab", getChild("pref core")->getCurrentPanelIndex()); + // Preferences search + //gSavedSettings.setS32("LastPrefTab", getChild("pref core")->getCurrentPanelIndex()); + if (mFilterEdit->getText().empty()) + { + gSavedSettings.setS32("LastPrefTab", getChild("pref core")->getCurrentPanelIndex()); + } + // LLPanelLogin::setAlwaysRefresh(false); if (!app_quitting) {