diff options
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 50adae09c0..5a9d1524f3 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -290,7 +290,10 @@ void LLInventoryPanel::modelChanged(U32 mask) const LLUUID& item_id = (*items_iter); const LLInventoryObject* model_item = model->getObject(item_id); LLFolderViewItem* view_item = mFolderRoot->getItemByID(item_id); - LLFolderViewFolder* view_folder = mFolderRoot->getFolderByID(item_id); + + // LLFolderViewFolder is derived from LLFolderViewItem so dynamic_cast from item + // to folder is the fast way to get a folder without searching through folders tree. + LLFolderViewFolder* view_folder = dynamic_cast<LLFolderViewFolder*>(view_item); ////////////////////////////// // LABEL Operation @@ -918,6 +921,8 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) { S32 z_min = S32_MAX; LLInventoryPanel* res = NULL; + LLFloater* active_inv_floaterp = NULL; + // A. If the inventory side panel is open, use that preferably. if (is_inventorysp_active()) { @@ -938,6 +943,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) { res = inventorySP->getActivePanel(); z_min = gFloaterView->getZOrder(inv_floater); + active_inv_floaterp = inv_floater; } else { @@ -957,10 +963,19 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) { res = iv->getPanel(); z_min = z_order; + active_inv_floaterp = iv; } } } - if (res) return res; + + if (res) + { + // Make sure the floater is not minimized (STORM-438). + if (active_inv_floaterp && active_inv_floaterp->isMinimized()) + active_inv_floaterp->setMinimized(FALSE); + + return res; + } // C. If no panels are open and we don't want to force open a panel, then just abort out. if (!auto_open) return NULL; |