summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-05-11 17:54:35 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-05-11 17:54:35 +0300
commitf7872f7ed1aaf42a6dc4a7999a554f428f6dfe60 (patch)
tree87e9e65931324bde409c677a189ed65cbcedb417 /indra/newview/llviewermessage.cpp
parent4a09f190d55483857ad70b7d2ddb75a98f0f57d7 (diff)
SL-19701 Clicking on 'Show' in inventory offering does not open inventory in Single folder
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 065e3ab3ad..78241a7c71 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -76,6 +76,7 @@
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llpanelgrouplandmoney.h"
+#include "llpanelmaininventory.h"
#include "llrecentpeople.h"
#include "llscriptfloater.h"
#include "llscriptruntimeperms.h"
@@ -1536,11 +1537,28 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
}
////////////////////////////////////////////////////////////////////////////////
+ static LLUICachedControl<bool> find_original_new_floater("FindOriginalOpenWindow", false);
+ //show in a new single-folder window
+ if(find_original_new_floater)
+ {
+ const LLInventoryObject *obj = gInventory.getObject(obj_id);
+ if (obj && obj->getParentUUID().notNull())
+ {
+ LLPanelMainInventory::newFolderWindow(obj->getParentUUID(), obj_id);
+ }
+ }
+ else
+ {
// Highlight item
const BOOL auto_open =
gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false
!from_name.empty(); // don't open if it's not from anyone.
- LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id);
+ if(auto_open)
+ {
+ LLFloaterReg::showInstance("inventory");
+ }
+ LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true);
+ }
}
}