diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-12-04 19:04:09 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-12-04 19:04:09 +0200 |
commit | b44e479893a1d000886a65bec5161f447e6a325a (patch) | |
tree | 195938576f7cf55e64d5188cd64088cf936ec011 /indra | |
parent | f32f0aff4b19461677cedfcab7bd3f66689cfe03 (diff) |
MAINT-7993 Fixed on uploading inventory will show up but won't display uploaded item
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.h | 8 | ||||
-rw-r--r-- | indra/newview/llmeshrepository.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llviewerassetupload.cpp | 15 |
4 files changed, 35 insertions, 15 deletions
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<LLSidepanelInventory>("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); } } } diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index d849647bb6..ace0ea7f42 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -220,8 +220,12 @@ public: // Find whichever inventory panel is active / on top. // "Auto_open" determines if we open an inventory panel if none are open. static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE); - - static void openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL main_panel = FALSE); + + static void openInventoryPanelAndSetSelection(BOOL auto_open, + const LLUUID& obj_id, + BOOL main_panel = FALSE, + BOOL take_keyboard_focus = TAKE_FOCUS_YES, + BOOL reset_filter = FALSE); void addItemID(const LLUUID& id, LLFolderViewItem* itemp); void removeItemID(const LLUUID& id); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 850a25107f..29a4ad001a 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -4840,26 +4840,32 @@ void on_new_single_inventory_upload_complete( gInventory.notifyObservers(); success = true; + LLFocusableElement* focus = gFocusMgr.getKeyboardFocus(); + // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. - LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(); + LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); if (panel) { - LLFocusableElement* focus = gFocusMgr.getKeyboardFocus(); panel->setSelection( server_response["new_inventory_item"].asUUID(), TAKE_FOCUS_NO); - - // restore keyboard focus - gFocusMgr.setKeyboardFocus(focus); } + else + { + LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, server_response["new_inventory_item"].asUUID(), TRUE, TAKE_FOCUS_NO, TRUE); + } + + // restore keyboard focus + gFocusMgr.setKeyboardFocus(focus); } else { LL_WARNS() << "Can't find a folder to put it in" << LL_ENDL; } + // Todo: This is mesh repository code, is following code really needed? // remove the "Uploading..." message LLUploadDialog::modalUploadFinished(); diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 01b4fcfbe1..4f68c9a98e 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -760,17 +760,22 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti { success = true; + LLFocusableElement* focus = gFocusMgr.getKeyboardFocus(); + // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. - LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(); + LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); if (panel) { - LLFocusableElement* focus = gFocusMgr.getKeyboardFocus(); panel->setSelection(serverInventoryItem, TAKE_FOCUS_NO); - - // restore keyboard focus - gFocusMgr.setKeyboardFocus(focus); } + else + { + LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, TRUE, TAKE_FOCUS_NO, TRUE); + } + + // restore keyboard focus + gFocusMgr.setKeyboardFocus(focus); } else { |