From 188b778abcd4d06a9fcfcf0eee0cce8ccf00ed9b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 29 Sep 2016 21:34:36 +0300 Subject: MAINT-6770 Remember appearance floater's chosen tab across logins --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llpaneloutfitsinventory.cpp | 8 ++++++++ 2 files changed, 19 insertions(+) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 674923e88d..797b866724 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5241,6 +5241,17 @@ Value 0 + LastAppearanceTab + + Comment + Last selected tab in appearance floater + Persist + 1 + Type + S32 + Value + 0 + LastMediaSettingsTab Comment diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 3f700496a9..3a35c49007 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -42,6 +42,7 @@ #include "llpanelwearing.h" #include "llsaveoutfitcombobtn.h" #include "llsidepanelappearance.h" +#include "llviewercontrol.h" #include "llviewerfoldertype.h" static const std::string OUTFITS_TAB_NAME = "outfitslist_tab"; @@ -67,6 +68,10 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() : LLPanelOutfitsInventory::~LLPanelOutfitsInventory() { + if (mAppearanceTabs) + { + gSavedSettings.setS32("LastAppearanceTab", mAppearanceTabs->getCurrentPanelIndex()); + } } // virtual @@ -87,6 +92,9 @@ BOOL LLPanelOutfitsInventory::postBuild() mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this, true)); + if (!mAppearanceTabs->selectTab(gSavedSettings.getS32("LastAppearanceTab"))) + mAppearanceTabs->selectFirstTab(); + return TRUE; } -- cgit v1.2.3