summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <none@none>2016-09-29 21:34:36 +0300
committerandreykproductengine <none@none>2016-09-29 21:34:36 +0300
commit188b778abcd4d06a9fcfcf0eee0cce8ccf00ed9b (patch)
treec19a469e20a6151de57d821d3c07f99958b3eccf
parent6b79410d3ab8e51147bd2957e2def4b11f0eaff4 (diff)
MAINT-6770 Remember appearance floater's chosen tab across logins
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp8
2 files changed, 19 insertions, 0 deletions
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 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>LastAppearanceTab</key>
+ <map>
+ <key>Comment</key>
+ <string>Last selected tab in appearance floater</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>LastMediaSettingsTab</key>
<map>
<key>Comment</key>
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;
}