summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-08-04 18:14:50 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-08-04 18:14:50 +0300
commit43561e558621c98117b5fc5263d5e4e40998173e (patch)
tree5264eeeea272782b1aec374a444a9215db6c6813
parentf94a19e09ebcf51e3e6cd3437fe364b60755406f (diff)
merge conflict fix
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp33
-rwxr-xr-xindra/newview/llinventoryfunctions.h13
2 files changed, 24 insertions, 22 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 68e0c26449..991c567546 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -959,19 +959,6 @@ void copy_folder_to_outbox(LLInventoryCategory* inv_cat, const LLUUID& dest_fold
open_outbox();
}
-static void items_removal_confirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option == 0 && !root.isDead() && !root.get()->isDead())
- {
- LLFolderView* folder_root = root.get();
- //Need to remove item from DND before item is removed from root folder view
- //because once removed from root folder view the item is no longer a selected item
- LLInventoryAction::removeItemFromDND(folder_root);
- folder_root->removeSelectedItems();
- }
-}
-
///----------------------------------------------------------------------------
// Marketplace functions
//
@@ -2486,7 +2473,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
LLSD args;
args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem");
- LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&items_removal_confirmation, _1, _2, root->getHandle()));
+ LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle()));
// Note: marketplace listings will be updated in the callback if delete confirmed
return;
}
@@ -2596,9 +2583,21 @@ void LLInventoryAction::removeItemFromDND(LLFolderView* root)
}
}
-
- // Update the marketplace listings that have been affected by the operation
- updateMarketplaceFolders();
+void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0 && !root.isDead() && !root.get()->isDead())
+ {
+ LLFolderView* folder_root = root.get();
+ //Need to remove item from DND before item is removed from root folder view
+ //because once removed from root folder view the item is no longer a selected item
+ LLInventoryAction::removeItemFromDND(folder_root);
+ folder_root->removeSelectedItems();
+
+ // Update the marketplace listings that have been affected by the operation
+ LLInventoryAction::updateMarketplaceFolders();
+ }
+}
void LLInventoryAction::buildMarketplaceFolders(LLFolderView* root)
{
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index f12802912a..e6e8164e35 100755
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -30,6 +30,7 @@
#include "llinventorymodel.h"
#include "llinventory.h"
+#include "llhandle.h"
#include "llwearabletype.h"
// compute_stock_count() return error code
@@ -444,7 +445,8 @@ public:
*******************************************************************************/
class LLFolderViewItem;
class LLFolderViewFolder;
-
+class LLInventoryModel;
+class LLFolderView;
class LLInventoryState
{
@@ -456,10 +458,11 @@ public:
struct LLInventoryAction
{
- static void doToSelected(class LLInventoryModel* model, class LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE);
- static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
- static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
- static void removeItemFromDND(LLFolderView* root);
+ static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE);
+ static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
+ static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action);
+ static void removeItemFromDND(LLFolderView* root);
+ static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle<LLFolderView> root);
private:
static void buildMarketplaceFolders(LLFolderView* root);