diff options
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 3c34ba32e2..164e72e621 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -402,9 +402,12 @@ void LLInventoryPanel::modelChanged(U32 mask) // static void LLInventoryPanel::onIdle(void *userdata) { + if (!gInventory.isInventoryUsable()) + return; + LLInventoryPanel *self = (LLInventoryPanel*)userdata; // Inventory just initialized, do complete build - if (!self->mViewsInitialized && gInventory.isInventoryUsable()) + if (!self->mViewsInitialized) { self->initializeViews(); } @@ -502,7 +505,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) // but still have the parent folder present for listener-related operations. if (id == mStartFolderID) { - folderp->setDontShowInHierarchy(TRUE); + folderp->setHidden(TRUE); } } } @@ -625,9 +628,15 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* accept, std::string& tooltip_msg) { - BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + // If folder view is empty the (x, y) point won't be in its rect + // so the handler must be called explicitly. + if (!mFolders->hasVisibleChildren()) + { + handled = mFolders->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + } + if (handled) { mFolders->setDragAndDropThisFrame(); |