diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-09-29 15:43:34 +0100 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-09-29 15:43:34 +0100 |
| commit | cb3042d84d51532c0b6953b69bdc8f9651ea7631 (patch) | |
| tree | eb9bd626f5f8c36fb5cdc50167061c1ba527a93f /indra/newview/llsidepanelinventory.cpp | |
| parent | 30b8d1a168042bd223849a23589ed96106f8e1a4 (diff) | |
| parent | b0cadec6fbd3c8d0ca21d5804061d2ce366b52dc (diff) | |
merge storm-248
Diffstat (limited to 'indra/newview/llsidepanelinventory.cpp')
| -rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 5b4c530f06..31ea542743 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -329,18 +329,17 @@ bool LLSidepanelInventory::canShare() LLPanelMainInventory* panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); - LLFolderView* root_folder = - panel_main_inventory->getActivePanel()->getRootFolder(); - - LLFolderViewItem* current_item = root_folder->hasVisibleChildren() - ? root_folder->getCurSelectedItem() - : NULL; + if (!panel_main_inventory) + { + llwarns << "Failed to get the main inventory panel" << llendl; + return false; + } - LLInvFVBridge* bridge = current_item - ? dynamic_cast <LLInvFVBridge*> (current_item->getListener()) - : NULL; + LLInventoryPanel* active_panel = panel_main_inventory->getActivePanel(); + // Avoid flicker in the Recent tab while inventory is being loaded. + if (!active_panel->getRootFolder()->hasVisibleChildren()) return false; - return bridge ? bridge->canShare() : false; + return LLAvatarActions::canShareSelectedItems(active_panel); } bool LLSidepanelInventory::canWearSelected() |
