Restore the old toggle behavior of the special inventory floaters

This commit is contained in:
Lirusaito
2019-05-04 07:12:40 -04:00
parent 2b47e62dd8
commit 7773f6b4f7
2 changed files with 8 additions and 1 deletions

View File

@@ -33,6 +33,13 @@ class LFFloaterInvPanel : public LLFloater, public LLInstanceTracker<LFFloaterIn
public:
static void show(const LLSD& cat, const std::string& name = LLStringUtil::null, LLInventoryModel* model = nullptr); // Show the floater for cat (create with other params if necessary)
static void toggle(const LLSD& cat)
{
if (auto instance = getInstance(cat))
instance->close();
else
show(cat);
}
static void closeAll(); // Called when not allowed to have inventory open
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);

View File

@@ -8938,7 +8938,7 @@ class SinguUrlAction : public view_listener_t
void show_inv_floater(const LLSD& userdata, const std::string& field)
{
LFFloaterInvPanel::show(LLSD().with(field, userdata));
LFFloaterInvPanel::toggle(LLSD().with(field, userdata));
}
static void visible_inv_floater(const LLSD& userdata, const std::string& field)