EXP-1715 FIX -- Merchant outbox drag and drop has offset between mouse position and selected folder
EXP-1717 FIX -- Drag and drop within the outbox can result in an item created at the top level of the outbox Folders are now created for items dragged around within the merchant outbox if their drop target is the top level outbox inventory panel itself.meow-7.2.2
parent
a96271e3c2
commit
d7fabfee19
|
|
@ -248,7 +248,7 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId)
|
|||
mOutboxInventoryPanel->setShape(inventory_placeholder_rect);
|
||||
|
||||
// Set the sort order newest to oldest
|
||||
mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
|
||||
mOutboxInventoryPanel->setSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME);
|
||||
mOutboxInventoryPanel->getFilter()->markDefault();
|
||||
|
||||
fetchOutboxContents();
|
||||
|
|
@ -340,19 +340,25 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
|||
EAcceptance* accept,
|
||||
std::string& tooltip_msg)
|
||||
{
|
||||
// Pass drag and drop to this floater to the outbox inventory control
|
||||
|
||||
if ((mOutboxInventoryPanel == NULL) ||
|
||||
(mWindowShade && mWindowShade->isShown()) ||
|
||||
LLMarketplaceInventoryImporter::getInstance()->isImportInProgress())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft;
|
||||
S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom;
|
||||
|
||||
return mOutboxInventoryPanel->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
|
||||
|
||||
BOOL handled = (childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg) != NULL);
|
||||
|
||||
// Pass drag and drop to this floater to the outbox inventory control if no other children handle it
|
||||
if (!handled)
|
||||
{
|
||||
S32 local_x = x - mOutboxInventoryPanel->getRect().mLeft;
|
||||
S32 local_y = y - mOutboxInventoryPanel->getRect().mBottom;
|
||||
|
||||
handled = mOutboxInventoryPanel->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
void LLFloaterOutbox::onImportButtonClicked()
|
||||
|
|
|
|||
|
|
@ -3463,6 +3463,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
{
|
||||
copy_item_to_outbox(inv_item, mUUID, LLUUID::null);
|
||||
}
|
||||
else if (move_is_into_outbox && move_is_from_outbox)
|
||||
{
|
||||
move_item_within_outbox(inv_item, mUUID);
|
||||
}
|
||||
// NORMAL or TRASH folder
|
||||
// (move the item, restamp if into trash)
|
||||
else
|
||||
|
|
|
|||
|
|
@ -588,7 +588,6 @@ void move_to_outbox_cb(const LLSD& notification, const LLSD& response)
|
|||
parent = next_parent;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -620,8 +619,7 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL
|
|||
gInventory.notifyObservers();
|
||||
}
|
||||
|
||||
copy_inventory_item(
|
||||
gAgent.getID(),
|
||||
copy_inventory_item(gAgent.getID(),
|
||||
inv_item->getPermissions().getOwner(),
|
||||
inv_item->getUUID(),
|
||||
dest_folder,
|
||||
|
|
@ -641,6 +639,23 @@ void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LL
|
|||
}
|
||||
}
|
||||
|
||||
void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder)
|
||||
{
|
||||
// when moving item directly into outbox create folder with that name
|
||||
if (dest_folder == gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false))
|
||||
{
|
||||
dest_folder = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_item->getName());
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
|
||||
LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *) inv_item;
|
||||
|
||||
change_item_parent(&gInventory,
|
||||
viewer_inv_item,
|
||||
dest_folder,
|
||||
false);
|
||||
}
|
||||
|
||||
void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder)
|
||||
{
|
||||
LLUUID new_folder_id = gInventory.createNewCategory(dest_folder, LLFolderType::FT_NONE, inv_cat->getName());
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::s
|
|||
void append_path(const LLUUID& id, std::string& path);
|
||||
|
||||
void copy_item_to_outbox(LLInventoryItem* inv_item, LLUUID dest_folder, const LLUUID& top_level_folder);
|
||||
void move_item_within_outbox(LLInventoryItem* inv_item, LLUUID dest_folder);
|
||||
|
||||
void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, const LLUUID& top_level_folder);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue