MAINT-5155 FIXED Don't allow moving link folders to COF folder.
parent
9b07635163
commit
348bfc7ea3
|
|
@ -2189,7 +2189,8 @@ int get_folder_path_length(const LLUUID& ancestor_id, const LLUUID& descendant_i
|
|||
|
||||
BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
||||
BOOL drop,
|
||||
std::string& tooltip_msg)
|
||||
std::string& tooltip_msg,
|
||||
BOOL is_link)
|
||||
{
|
||||
|
||||
LLInventoryModel* model = getInventoryModel();
|
||||
|
|
@ -2231,6 +2232,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id);
|
||||
const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id);
|
||||
const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
|
||||
const BOOL move_is_into_current_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT);
|
||||
const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id);
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
|
|
@ -2259,6 +2261,10 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
|||
is_movable = FALSE;
|
||||
// tooltip?
|
||||
}
|
||||
if(is_movable && move_is_into_current_outfit && is_link)
|
||||
{
|
||||
is_movable = FALSE;
|
||||
}
|
||||
if (is_movable && (mUUID == model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE)))
|
||||
{
|
||||
is_movable = FALSE;
|
||||
|
|
@ -3635,7 +3641,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
|
|||
LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID());
|
||||
if (linked_category)
|
||||
{
|
||||
accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg);
|
||||
accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ public:
|
|||
{}
|
||||
|
||||
BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg);
|
||||
BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg);
|
||||
BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg, BOOL is_link = FALSE);
|
||||
|
||||
virtual void buildDisplayName() const;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue