summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-03-21 20:23:01 -0700
committerMerov Linden <merov@lindenlab.com>2015-03-21 20:23:01 -0700
commitbdb9a769f12754dadf324b3dd395c1ca1519f938 (patch)
tree979162585c0cbc3159eaa81885f9f691790ba985
parentb8a799cb870b1df88a9ae8a407f8c2d9e00c558b (diff)
DD-371 : Do not go through the accept logic when user confirmation is not required (because already given)
-rwxr-xr-xindra/newview/llinventorybridge.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index d7a5594bb1..b7b2d1b285 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4520,27 +4520,27 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
//--------------------------------------------------------------------------------
// Determine if item can be moved & dropped
- //
+ // Note: if user_confirm is false, we already went through those accept logic test and can skip them
accept = TRUE;
- if (!is_movable)
+ if (user_confirm && !is_movable)
{
accept = FALSE;
}
- else if ((mUUID == inv_item->getParentUUID()) && !move_is_into_favorites)
+ else if (user_confirm && (mUUID == inv_item->getParentUUID()) && !move_is_into_favorites)
{
accept = FALSE;
}
- else if (move_is_into_current_outfit || move_is_into_outfit)
+ else if (user_confirm && (move_is_into_current_outfit || move_is_into_outfit))
{
accept = can_move_to_outfit(inv_item, move_is_into_current_outfit);
}
- else if (move_is_into_favorites || move_is_into_landmarks)
+ else if (user_confirm && (move_is_into_favorites || move_is_into_landmarks))
{
accept = can_move_to_landmarks(inv_item);
}
- else if (move_is_into_outbox || move_is_into_marketplacelistings)
+ else if (user_confirm && (move_is_into_outbox || move_is_into_marketplacelistings))
{
const LLViewerInventoryCategory * master_folder = (move_is_into_outbox ? model->getFirstDescendantOf(outbox_id, mUUID) : model->getFirstDescendantOf(marketplacelistings_id, mUUID));
LLViewerInventoryCategory * dest_folder = getCategory();
@@ -4548,7 +4548,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
}
// Check that the folder can accept this item based on folder/item type compatibility (e.g. stock folder compatibility)
- if (accept)
+ if (user_confirm && accept)
{
LLViewerInventoryCategory * dest_folder = getCategory();
accept = dest_folder->acceptItem(inv_item);
@@ -4558,7 +4558,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// Check whether the item being dragged from active inventory panel
// passes the filter of the destination panel.
- if (accept && active_panel && use_filter)
+ if (user_confirm && accept && active_panel && use_filter)
{
LLFolderViewItem* fv_item = active_panel->getItemByID(inv_item->getUUID());
if (!fv_item) return false;
@@ -4578,9 +4578,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// RN: a better solution would be to deselect automatically when an item is moved
// and then select any item that is dropped only in the panel that it is dropped in
if (active_panel && (destination_panel != active_panel))
- {
- active_panel->unSelectAll();
- }
+ {
+ active_panel->unSelectAll();
+ }
// Dropping in or out of marketplace needs (sometimes) confirmation
if (user_confirm && (move_is_from_marketplacelistings || move_is_into_marketplacelistings))
{