From 19320842ebc39c1b528a2107323f9e918d688177 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 19 Jan 2012 16:57:09 +0200 Subject: EXP-1767 FIXED Received Items panel state being persistent between sessions. Added a setting to store the panel state. --- indra/newview/llsidepanelinventory.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 3761eb5777..e1043c34c7 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -220,15 +220,17 @@ BOOL LLSidepanelInventory::postBuild() // Disable user_resize on main inventory panel by default inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false); - // Collapse inbox panel - inv_stack->collapsePanel(getChild(INBOX_LAYOUT_PANEL_NAME), true); - // Set up button states and callbacks LLButton * inbox_button = getChild(INBOX_BUTTON_NAME); - inbox_button->setToggleState(false); inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this)); + // Get the previous inbox state from "InventoryInboxToggleState" setting. + bool is_inbox_collapsed = !inbox_button->getToggleState(); + + // Restore the collapsed inbox panel state + inv_stack->collapsePanel(getChild(INBOX_LAYOUT_PANEL_NAME), is_inbox_collapsed); + // Set the inbox visible based on debug settings (final setting comes from http request below) enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); -- cgit v1.2.3