diff options
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--[-rwxr-xr-x] | indra/newview/llpanelmaininventory.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 4229419fce..c779ba5cdd 100755..100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -150,6 +150,7 @@ BOOL LLPanelMainInventory::postBuild() LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>("Recent Items"); if (recent_items_panel) { + // assign default values until we will be sure that we have setting to restore recent_items_panel->setSinceLogoff(TRUE); recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE); recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); @@ -181,6 +182,7 @@ BOOL LLPanelMainInventory::postBuild() LLParamSDParser parser; parser.readSD(recent_items, p); recent_items_panel->getFilter().fromParams(p); + recent_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::RECENTITEMS_SORT_ORDER)); } } @@ -372,7 +374,14 @@ void LLPanelMainInventory::setSortBy(const LLSD& userdata) } getActivePanel()->setSortOrder(sort_order_mask); - gSavedSettings.setU32("InventorySortOrder", sort_order_mask); + if ("Recent Items" == getActivePanel()->getName()) + { + gSavedSettings.setU32("RecentItemsSortOrder", sort_order_mask); + } + else + { + gSavedSettings.setU32("InventorySortOrder", sort_order_mask); + } } // static @@ -1143,6 +1152,15 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } } +void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility ) +{ + if(!new_visibility) + { + mMenuAdd->setVisible(FALSE); + getActivePanel()->getRootFolder()->finishRenamingItem(); + } +} + bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) { LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); |