FIRE-33305: Fix secondary inventory window being empty
parent
7cd953967f
commit
0a8da4aa43
|
|
@ -260,7 +260,10 @@ BOOL LLSidepanelInventory::postBuild()
|
|||
//gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
|
||||
|
||||
LLFloater *floater = dynamic_cast<LLFloater*>(getParent());
|
||||
if (floater && floater->getKey().isUndefined() && !sLoginCompleted)
|
||||
// <FS:Ansariel> Secondary inventory window
|
||||
//if (floater && floater->getKey().isUndefined() && !sLoginCompleted)
|
||||
if (floater && ((floater->getKey().isUndefined() && !sLoginCompleted) || (floater->getKey().has("is_secondary") && floater->getKey()["is_secondary"].asBoolean())))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// Prefill inventory for primary inventory floater
|
||||
// Other floaters should fill on visibility change
|
||||
|
|
@ -702,3 +705,11 @@ void LLSidepanelInventory::onReloadInboxClicked()
|
|||
}
|
||||
}
|
||||
// </FS:Zi>
|
||||
|
||||
// <FS:Ansariel> Secondary inventory window
|
||||
//static
|
||||
LLFloater* LLSidepanelInventory::createSecondaryInventoryWindow(const LLSD& key)
|
||||
{
|
||||
return LLFloaterReg::build<LLFloaterSidePanelContainer>(LLSD().with("is_secondary", true));
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class LLLayoutPanel;
|
|||
class LLPanelMainInventory;
|
||||
class LLSidepanelItemInfo;
|
||||
class LLSidepanelTaskInfo;
|
||||
class LLFloater; // <FS:Ansariel> Secondary inventory window
|
||||
|
||||
class LLSidepanelInventory : public LLPanel
|
||||
{
|
||||
|
|
@ -87,6 +88,9 @@ public:
|
|||
|
||||
static void cleanup();
|
||||
|
||||
// <FS:Ansariel> Secondary inventory window
|
||||
static LLFloater* createSecondaryInventoryWindow(const LLSD& key);
|
||||
|
||||
protected:
|
||||
// Tracks highlighted (selected) item in inventory panel.
|
||||
LLInventoryItem *getSelectedItem();
|
||||
|
|
|
|||
|
|
@ -221,6 +221,7 @@
|
|||
#include "llfloaterscriptrecover.h"
|
||||
#include "llfloatersearchreplace.h"
|
||||
#include "llpanelgroup.h"
|
||||
#include "llsidepanelinventory.h"
|
||||
#include "NACLfloaterexploresounds.h"
|
||||
#include "particleeditor.h"
|
||||
#include "quickprefs.h"
|
||||
|
|
@ -633,10 +634,10 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("quickprefs", "floater_quickprefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FloaterQuickPrefs>);
|
||||
LLFloaterReg::add("region_tracker", "floater_region_tracker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<ALFloaterRegionTracker>);
|
||||
LLFloaterReg::add("search_replace", "floater_search_replace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearchReplace>);
|
||||
LLFloaterReg::add("secondary_inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
|
||||
LLFloaterReg::add("secondary_inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLSidepanelInventory::createSecondaryInventoryWindow);
|
||||
LLFloaterReg::add("script_recover", "floater_script_recover.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptRecover>);
|
||||
LLFloaterReg::add("sound_explorer", "floater_NACL_explore_sounds.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<NACLFloaterExploreSounds>);
|
||||
LLFloaterReg::add("vram_usage", "floater_fs_vram_usage.xml", static_cast<LLFloaterBuildFunc>( &LLFloaterReg::build< FSFloaterVRAMUsage >) );
|
||||
LLFloaterReg::add("vram_usage", "floater_fs_vram_usage.xml", static_cast<LLFloaterBuildFunc>(&LLFloaterReg::build<FSFloaterVRAMUsage>));
|
||||
LLFloaterReg::add("local_mesh_floater", "floater_vj_local_mesh.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLocalMesh>); // local mesh
|
||||
|
||||
LLFloaterReg::registerControlVariables(); // Make sure visibility and rect controls get preserved when saving
|
||||
|
|
|
|||
Loading…
Reference in New Issue