From 6fb3b50a29b03fb416db81a1871658219a9279b9 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 16 Nov 2017 18:11:38 +0200 Subject: MAINT-8006 FIXED The items from 'Received items' panel are not displayed in 'Worn' tab --- indra/newview/llinventorypanel.cpp | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index d610b920b9..798434a257 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1376,38 +1376,15 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L if (active_panel) { LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL; - - LLViewerInventoryItem * item = gInventory.getItem(obj_id); - LLViewerInventoryCategory * cat = gInventory.getCategory(obj_id); - - bool in_inbox = false; - - LLViewerInventoryCategory * parent_cat = NULL; - - if (item) - { - parent_cat = gInventory.getCategory(item->getParentUUID()); - } - else if (cat) - { - parent_cat = gInventory.getCategory(cat->getParentUUID()); - } - - if (parent_cat) - { - in_inbox = (LLFolderType::FT_INBOX == parent_cat->getPreferredType()); - } + + bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX))); if (in_inbox) { LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); LLInventoryPanel * inventory_panel = NULL; - - if (in_inbox) - { - sidepanel_inventory->openInbox(); - inventory_panel = sidepanel_inventory->getInboxPanel(); - } + sidepanel_inventory->openInbox(); + inventory_panel = sidepanel_inventory->getInboxPanel(); if (inventory_panel) { -- cgit v1.2.3 From 667f2fedef33b6fb217939290e6b097d7447de92 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 17 Nov 2017 17:21:25 +0200 Subject: MAINT-8013 FIXED Unnecessary tab change after using 'Show in Main panel' for items from 'Received items' panel --- indra/newview/llinventorypanel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 798434a257..6e7f62d84a 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1367,7 +1367,9 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel) { LLInventoryPanel *active_panel; - if (main_panel) + bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX))); + + if (main_panel && !in_inbox) { LLFloaterSidePanelContainer::getPanel("inventory")->selectAllItemsPanel(); } @@ -1377,8 +1379,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L { LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL; - bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX))); - if (in_inbox) { LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); -- cgit v1.2.3 From b44e479893a1d000886a65bec5161f447e6a325a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 4 Dec 2017 19:04:09 +0200 Subject: MAINT-7993 Fixed on uploading inventory will show up but won't display uploaded item --- indra/newview/llinventorypanel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6e7f62d84a..83a8678c86 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1364,7 +1364,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) } //static -void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel) +void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel, BOOL take_keyboard_focus, BOOL reset_filter) { LLInventoryPanel *active_panel; bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX))); @@ -1379,6 +1379,11 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L { LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL; + if (reset_filter) + { + reset_inventory_filter(); + } + if (in_inbox) { LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); @@ -1388,7 +1393,7 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L if (inventory_panel) { - inventory_panel->setSelection(obj_id, TAKE_FOCUS_YES); + inventory_panel->setSelection(obj_id, take_keyboard_focus); } } else @@ -1398,7 +1403,7 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L { floater_inventory->setFocus(TRUE); } - active_panel->setSelection(obj_id, TAKE_FOCUS_YES); + active_panel->setSelection(obj_id, take_keyboard_focus); } } } -- cgit v1.2.3 From 9db2de69f15723518b7129dd198332520e958b85 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 13 Dec 2017 12:47:25 +0200 Subject: MAINT-8061 Consider including folder count along with object count --- indra/newview/llinventorypanel.cpp | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 83a8678c86..2762c7af82 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1110,6 +1110,56 @@ void LLInventoryPanel::onSelectionChange(const std::deque& it fv->startRenamingSelectedItem(); } } + + std::set selected_items = mFolderRoot.get()->getSelectionList(); + LLFolderViewItem* prev_folder_item = getItemByID(mPreviousSelectedFolder); + + if (selected_items.size() == 1) + { + std::set::const_iterator iter = selected_items.begin(); + LLFolderViewItem* folder_item = (*iter); + if(folder_item && (folder_item != prev_folder_item)) + { + LLFolderViewModelItemInventory* fve_listener = static_cast(folder_item->getViewModelItem()); + if (fve_listener && (fve_listener->getInventoryType() == LLInventoryType::IT_CATEGORY)) + { + if(prev_folder_item) + { + LLFolderBridge* prev_bridge = (LLFolderBridge*)prev_folder_item->getViewModelItem(); + if(prev_bridge) + { + prev_bridge->clearDisplayName(); + prev_bridge->setShowDescendantsCount(false); + prev_folder_item->refresh(); + } + } + + LLFolderBridge* bridge = (LLFolderBridge*)folder_item->getViewModelItem(); + if(bridge) + { + bridge->clearDisplayName(); + bridge->setShowDescendantsCount(true); + folder_item->refresh(); + mPreviousSelectedFolder = bridge->getUUID(); + } + } + } + } + else + { + if(prev_folder_item) + { + LLFolderBridge* prev_bridge = (LLFolderBridge*)prev_folder_item->getViewModelItem(); + if(prev_bridge) + { + prev_bridge->clearDisplayName(); + prev_bridge->setShowDescendantsCount(false); + prev_folder_item->refresh(); + } + } + mPreviousSelectedFolder = LLUUID(); + } + } void LLInventoryPanel::doCreate(const LLSD& userdata) -- cgit v1.2.3 From de8ff2c7b397f22d1e15b21e7553a8c3e3933d45 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 20 Dec 2017 17:01:47 +0200 Subject: MAINT-8061 update folder label when item count changes --- indra/newview/llinventorypanel.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 2762c7af82..93269db380 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -563,6 +563,7 @@ void LLInventoryPanel::modelChanged(U32 mask) { setSelection(item_id, FALSE); } + updateFolderLabel(model_item->getParentUUID()); } ////////////////////////////// @@ -574,6 +575,7 @@ void LLInventoryPanel::modelChanged(U32 mask) // Don't process the item if it is the root if (old_parent) { + LLFolderViewModelItemInventory* viewmodel_folder = static_cast(old_parent->getViewModelItem()); LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID()); // Item has been moved. if (old_parent != new_parent) @@ -591,6 +593,7 @@ void LLInventoryPanel::modelChanged(U32 mask) setSelection(item_id, FALSE); } } + updateFolderLabel(model_item->getParentUUID()); } else { @@ -602,6 +605,10 @@ void LLInventoryPanel::modelChanged(U32 mask) // doesn't include trash). Just remove the item's UI. view_item->destroyView(); } + if(viewmodel_folder) + { + updateFolderLabel(viewmodel_folder->getUUID()); + } old_parent->getViewModelItem()->dirtyDescendantsFilter(); } } @@ -619,6 +626,11 @@ void LLInventoryPanel::modelChanged(U32 mask) if(parent) { parent->getViewModelItem()->dirtyDescendantsFilter(); + LLFolderViewModelItemInventory* viewmodel_folder = static_cast(parent->getViewModelItem()); + if(viewmodel_folder) + { + updateFolderLabel(viewmodel_folder->getUUID()); + } } } } @@ -1162,6 +1174,23 @@ void LLInventoryPanel::onSelectionChange(const std::deque& it } +void LLInventoryPanel::updateFolderLabel(const LLUUID& folder_id) +{ + if(folder_id != mPreviousSelectedFolder) return; + + LLFolderViewItem* folder_item = getItemByID(mPreviousSelectedFolder); + if(folder_item) + { + LLFolderBridge* bridge = (LLFolderBridge*)folder_item->getViewModelItem(); + if(bridge) + { + bridge->clearDisplayName(); + bridge->setShowDescendantsCount(true); + folder_item->refresh(); + } + } +} + void LLInventoryPanel::doCreate(const LLSD& userdata) { reset_inventory_filter(); -- cgit v1.2.3