summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 1e510a2d7b..7f8f9b29af 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -39,6 +39,7 @@
#include "llfiltereditor.h"
#include "llfirstuse.h"
#include "llfloaterreg.h"
+#include "llfloatersidepanelcontainer.h"
#include "llmenubutton.h"
#include "llnotificationsutil.h"
#include "lltabcontainer.h"
@@ -64,7 +65,6 @@
#include "llpanelplaceprofile.h"
#include "llpanelteleporthistory.h"
#include "llremoteparcelrequest.h"
-#include "llsidetray.h"
#include "llteleporthistorystorage.h"
#include "lltoggleablemenu.h"
#include "llviewerinventory.h"
@@ -115,7 +115,7 @@ public:
LLSD key;
key["type"] = "remote_place";
key["id"] = parcel_id;
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLFloaterSidePanelContainer::showPanel("places", key);
return true;
}
}
@@ -151,18 +151,16 @@ class LLPlacesInventoryObserver : public LLInventoryAddedObserver
{
public:
LLPlacesInventoryObserver(LLPanelPlaces* places_panel) :
- mPlaces(places_panel),
- mTabsCreated(false)
+ mPlaces(places_panel)
{}
/*virtual*/ void changed(U32 mask)
{
LLInventoryAddedObserver::changed(mask);
- if (!mTabsCreated && mPlaces)
+ if (mPlaces && !mPlaces->tabsCreated())
{
mPlaces->createTabs();
- mTabsCreated = true;
}
}
@@ -175,7 +173,6 @@ protected:
private:
LLPanelPlaces* mPlaces;
- bool mTabsCreated;
};
class LLPlacesRemoteParcelInfoObserver : public LLRemoteParcelInfoObserver
@@ -244,7 +241,8 @@ LLPanelPlaces::LLPanelPlaces()
mPlaceMenu(NULL),
mLandmarkMenu(NULL),
mPosGlobal(),
- isLandmarkEditModeOn(false)
+ isLandmarkEditModeOn(false),
+ mTabsCreated(false)
{
mParcelObserver = new LLPlacesParcelObserver(this);
mInventoryObserver = new LLPlacesInventoryObserver(this);
@@ -252,7 +250,7 @@ LLPanelPlaces::LLPanelPlaces()
gInventory.addObserver(mInventoryObserver);
- LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
+ mAgentParcelChangedConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
boost::bind(&LLPanelPlaces::updateVerbs, this));
//buildFromFile( "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
@@ -268,6 +266,11 @@ LLPanelPlaces::~LLPanelPlaces()
delete mInventoryObserver;
delete mParcelObserver;
delete mRemoteParcelObserver;
+
+ if (mAgentParcelChangedConnection.connected())
+ {
+ mAgentParcelChangedConnection.disconnect();
+ }
}
BOOL LLPanelPlaces::postBuild()
@@ -349,6 +352,9 @@ BOOL LLPanelPlaces::postBuild()
LLComboBox* folder_combo = mLandmarkInfo->getChild<LLComboBox>("folder_combo");
folder_combo->setCommitCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this));
+ createTabs();
+ updateVerbs();
+
return TRUE;
}
@@ -1025,7 +1031,7 @@ void LLPanelPlaces::changedParcelSelection()
void LLPanelPlaces::createTabs()
{
- if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance()))
+ if (!(gInventory.isInventoryUsable() && LLTeleportHistory::getInstance() && !mTabsCreated))
return;
LLLandmarksPanel* landmarks_panel = new LLLandmarksPanel();
@@ -1059,6 +1065,8 @@ void LLPanelPlaces::createTabs()
// Filter applied to show all items.
if (mActivePanel)
mActivePanel->onSearchEdit(mActivePanel->getFilterSubString());
+
+ mTabsCreated = true;
}
void LLPanelPlaces::changedGlobalPos(const LLVector3d &global_pos)