Skip to content
Snippets Groups Projects
Commit 5e15eaca authored by prep linden's avatar prep linden
Browse files

merge

parents c17d967d 37ca2964
Branches
Tags
No related merge requests found
...@@ -1110,9 +1110,9 @@ ...@@ -1110,9 +1110,9 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>e089a9bb38fe8c0f96c0b9c172e4d8dd</string> <string>c34d14026facc6481971ab34bcf6a835</string>
<key>url</key> <key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258508/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120531.tar.bz2</string> <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258547/arch/Darwin/installer/llphysicsextensions-0.1-darwin-20120531.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>darwin</string> <string>darwin</string>
...@@ -1122,9 +1122,9 @@ ...@@ -1122,9 +1122,9 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>9682692c9c429367a8cb78fe15863ac3</string> <string>c87e7d3a12e44e247733d6c242885de2</string>
<key>url</key> <key>url</key>
<string>'http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258508/arch/Linux/installer/llphysicsextensions-0.1-linux-20120531.tar.bz2</string> <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258547/arch/Linux/installer/llphysicsextensions-0.1-linux-20120601.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>linux</string> <string>linux</string>
...@@ -1134,9 +1134,9 @@ ...@@ -1134,9 +1134,9 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>01fd675e59013126a49b451e88724b2b</string> <string>38a31993f6e46eb18e88419cec793eaf</string>
<key>url</key> <key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258508/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120531.tar.bz2</string> <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/stinson_llpathinglibrary/rev/258547/arch/CYGWIN/installer/llphysicsextensions-0.1-windows-20120531.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows</string> <string>windows</string>
......
...@@ -243,6 +243,7 @@ LLAgent::LLAgent() : ...@@ -243,6 +243,7 @@ LLAgent::LLAgent() :
mbTeleportKeepsLookAt(false), mbTeleportKeepsLookAt(false),
mAgentAccess(new LLAgentAccess(gSavedSettings)), mAgentAccess(new LLAgentAccess(gSavedSettings)),
mGodLevelChangeSignal(),
mCanEditParcel(false), mCanEditParcel(false),
mTeleportSourceSLURL(new LLSLURL), mTeleportSourceSLURL(new LLSLURL),
mTeleportState( TELEPORT_NONE ), mTeleportState( TELEPORT_NONE ),
...@@ -2434,6 +2435,12 @@ void LLAgent::setAdminOverride(BOOL b) ...@@ -2434,6 +2435,12 @@ void LLAgent::setAdminOverride(BOOL b)
void LLAgent::setGodLevel(U8 god_level) void LLAgent::setGodLevel(U8 god_level)
{ {
mAgentAccess->setGodLevel(god_level); mAgentAccess->setGodLevel(god_level);
mGodLevelChangeSignal(god_level);
}
LLAgent::god_level_change_slot_t LLAgent::registerGodLevelChanageListener(god_level_change_callback_t pGodLevelChangeCallback)
{
return mGodLevelChangeSignal.connect(pGodLevelChangeCallback);
} }
void LLAgent::setAOTransition() void LLAgent::setAOTransition()
......
...@@ -631,6 +631,16 @@ class LLAgent : public LLOldEvents::LLObservable ...@@ -631,6 +631,16 @@ class LLAgent : public LLOldEvents::LLObservable
void requestEnterGodMode(); void requestEnterGodMode();
void requestLeaveGodMode(); void requestLeaveGodMode();
typedef boost::function<void (U8)> god_level_change_callback_t;
typedef boost::signals2::signal<void (U8)> god_level_change_signal_t;
typedef boost::signals2::connection god_level_change_slot_t;
god_level_change_slot_t registerGodLevelChanageListener(god_level_change_callback_t pGodLevelChangeCallback);
private:
god_level_change_signal_t mGodLevelChangeSignal;
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// Maturity // Maturity
//-------------------------------------------------------------------- //--------------------------------------------------------------------
......
...@@ -264,13 +264,6 @@ LLSD LLFloaterPathfindingLinksets::convertObjectsIntoScrollListData(const LLPath ...@@ -264,13 +264,6 @@ LLSD LLFloaterPathfindingLinksets::convertObjectsIntoScrollListData(const LLPath
void LLFloaterPathfindingLinksets::updateControls() void LLFloaterPathfindingLinksets::updateControls()
{ {
LLFloaterPathfindingObjects::updateControls(); LLFloaterPathfindingObjects::updateControls();
updateStateOnEditFields();
updateStateOnEditLinksetUse();
}
void LLFloaterPathfindingLinksets::updateSelection()
{
LLFloaterPathfindingObjects::updateSelection();
updateEditFieldValues(); updateEditFieldValues();
updateStateOnEditFields(); updateStateOnEditFields();
updateStateOnEditLinksetUse(); updateStateOnEditLinksetUse();
......
...@@ -65,7 +65,6 @@ class LLFloaterPathfindingLinksets : public LLFloaterPathfindingObjects ...@@ -65,7 +65,6 @@ class LLFloaterPathfindingLinksets : public LLFloaterPathfindingObjects
virtual LLSD convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr) const; virtual LLSD convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr) const;
virtual void updateControls(); virtual void updateControls();
virtual void updateSelection();
virtual S32 getNameColumnIndex() const; virtual S32 getNameColumnIndex() const;
virtual const LLColor4 &getBeaconColor() const; virtual const LLColor4 &getBeaconColor() const;
......
...@@ -74,7 +74,7 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey) ...@@ -74,7 +74,7 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey)
if (!mSelectionUpdateSlot.connected()) if (!mSelectionUpdateSlot.connected())
{ {
mSelectionUpdateSlot = LLSelectMgr::getInstance()->mUpdateSignal.connect(boost::bind(&LLFloaterPathfindingObjects::onSelectionListChanged, this)); mSelectionUpdateSlot = LLSelectMgr::getInstance()->mUpdateSignal.connect(boost::bind(&LLFloaterPathfindingObjects::onInWorldSelectionListChanged, this));
} }
if (!mRegionBoundaryCrossingSlot.connected()) if (!mRegionBoundaryCrossingSlot.connected())
...@@ -82,11 +82,21 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey) ...@@ -82,11 +82,21 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey)
mRegionBoundaryCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLFloaterPathfindingObjects::onRegionBoundaryCrossed, this)); mRegionBoundaryCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLFloaterPathfindingObjects::onRegionBoundaryCrossed, this));
} }
if (!mGodLevelChangeSlot.connected())
{
mGodLevelChangeSlot = gAgent.registerGodLevelChanageListener(boost::bind(&LLFloaterPathfindingObjects::onGodLevelChange, this, _1));
}
requestGetObjects(); requestGetObjects();
} }
void LLFloaterPathfindingObjects::onClose(bool pIsAppQuitting) void LLFloaterPathfindingObjects::onClose(bool pIsAppQuitting)
{ {
if (mGodLevelChangeSlot.connected())
{
mGodLevelChangeSlot.disconnect();
}
if (mRegionBoundaryCrossingSlot.connected()) if (mRegionBoundaryCrossingSlot.connected())
{ {
mRegionBoundaryCrossingSlot.disconnect(); mRegionBoundaryCrossingSlot.disconnect();
...@@ -357,40 +367,6 @@ void LLFloaterPathfindingObjects::updateControls() ...@@ -357,40 +367,6 @@ void LLFloaterPathfindingObjects::updateControls()
updateStateOnEditFields(); updateStateOnEditFields();
} }
void LLFloaterPathfindingObjects::updateSelection()
{
mObjectsSelection.clear();
LLSelectMgr::getInstance()->deselectAll();
std::vector<LLScrollListItem *> selectedItems = mObjectsScrollList->getAllSelected();
if (!selectedItems.empty())
{
int numSelectedItems = selectedItems.size();
std::vector<LLViewerObject *>viewerObjects;
viewerObjects.reserve(numSelectedItems);
for (std::vector<LLScrollListItem *>::const_iterator selectedItemIter = selectedItems.begin();
selectedItemIter != selectedItems.end(); ++selectedItemIter)
{
const LLScrollListItem *selectedItem = *selectedItemIter;
LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID());
if (viewerObject != NULL)
{
viewerObjects.push_back(viewerObject);
}
}
if (!viewerObjects.empty())
{
mObjectsSelection = LLSelectMgr::getInstance()->selectObjectAndFamily(viewerObjects);
}
}
updateControls();
}
S32 LLFloaterPathfindingObjects::getNameColumnIndex() const S32 LLFloaterPathfindingObjects::getNameColumnIndex() const
{ {
return 0; return 0;
...@@ -552,10 +528,10 @@ void LLFloaterPathfindingObjects::onTeleportClicked() ...@@ -552,10 +528,10 @@ void LLFloaterPathfindingObjects::onTeleportClicked()
void LLFloaterPathfindingObjects::onScrollListSelectionChanged() void LLFloaterPathfindingObjects::onScrollListSelectionChanged()
{ {
updateSelection(); updateOnScrollListChange();
} }
void LLFloaterPathfindingObjects::onSelectionListChanged() void LLFloaterPathfindingObjects::onInWorldSelectionListChanged()
{ {
updateControls(); updateControls();
} }
...@@ -565,6 +541,11 @@ void LLFloaterPathfindingObjects::onRegionBoundaryCrossed() ...@@ -565,6 +541,11 @@ void LLFloaterPathfindingObjects::onRegionBoundaryCrossed()
requestGetObjects(); requestGetObjects();
} }
void LLFloaterPathfindingObjects::onGodLevelChange(U8 pGodLevel)
{
requestGetObjects();
}
void LLFloaterPathfindingObjects::updateMessagingStatus() void LLFloaterPathfindingObjects::updateMessagingStatus()
{ {
std::string statusText(""); std::string statusText("");
...@@ -676,6 +657,38 @@ void LLFloaterPathfindingObjects::updateStateOnEditFields() ...@@ -676,6 +657,38 @@ void LLFloaterPathfindingObjects::updateStateOnEditFields()
mTeleportButton->setEnabled(numSelectedItems == 1); mTeleportButton->setEnabled(numSelectedItems == 1);
} }
void LLFloaterPathfindingObjects::updateOnScrollListChange()
{
mObjectsSelection.clear();
LLSelectMgr::getInstance()->deselectAll();
std::vector<LLScrollListItem *> selectedItems = mObjectsScrollList->getAllSelected();
if (!selectedItems.empty())
{
int numSelectedItems = selectedItems.size();
std::vector<LLViewerObject *>viewerObjects;
viewerObjects.reserve(numSelectedItems);
for (std::vector<LLScrollListItem *>::const_iterator selectedItemIter = selectedItems.begin();
selectedItemIter != selectedItems.end(); ++selectedItemIter)
{
const LLScrollListItem *selectedItem = *selectedItemIter;
LLViewerObject *viewerObject = gObjectList.findObject(selectedItem->getUUID());
if (viewerObject != NULL)
{
viewerObjects.push_back(viewerObject);
}
}
if (!viewerObjects.empty())
{
mObjectsSelection = LLSelectMgr::getInstance()->selectObjectAndFamily(viewerObjects);
}
}
}
LLPathfindingObjectPtr LLFloaterPathfindingObjects::findObject(const LLScrollListItem *pListItem) const LLPathfindingObjectPtr LLFloaterPathfindingObjects::findObject(const LLScrollListItem *pListItem) const
{ {
LLPathfindingObjectPtr objectPtr; LLPathfindingObjectPtr objectPtr;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <boost/signals2.hpp> #include <boost/signals2.hpp>
#include "llagent.h"
#include "llfloater.h" #include "llfloater.h"
#include "llpathfindingmanager.h" #include "llpathfindingmanager.h"
#include "llpathfindingobject.h" #include "llpathfindingobject.h"
...@@ -78,7 +79,6 @@ class LLFloaterPathfindingObjects : public LLFloater ...@@ -78,7 +79,6 @@ class LLFloaterPathfindingObjects : public LLFloater
virtual LLSD convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr) const; virtual LLSD convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr) const;
virtual void updateControls(); virtual void updateControls();
virtual void updateSelection();
virtual S32 getNameColumnIndex() const; virtual S32 getNameColumnIndex() const;
virtual const LLColor4 &getBeaconColor() const; virtual const LLColor4 &getBeaconColor() const;
...@@ -118,12 +118,14 @@ class LLFloaterPathfindingObjects : public LLFloater ...@@ -118,12 +118,14 @@ class LLFloaterPathfindingObjects : public LLFloater
void onTeleportClicked(); void onTeleportClicked();
void onScrollListSelectionChanged(); void onScrollListSelectionChanged();
void onSelectionListChanged(); void onInWorldSelectionListChanged();
void onRegionBoundaryCrossed(); void onRegionBoundaryCrossed();
void onGodLevelChange(U8 pGodLevel);
void updateMessagingStatus(); void updateMessagingStatus();
void updateStateOnListActionControls(); void updateStateOnListActionControls();
void updateStateOnEditFields(); void updateStateOnEditFields();
void updateOnScrollListChange();
LLPathfindingObjectPtr findObject(const LLScrollListItem *pListItem) const; LLPathfindingObjectPtr findObject(const LLScrollListItem *pListItem) const;
...@@ -154,6 +156,7 @@ class LLFloaterPathfindingObjects : public LLFloater ...@@ -154,6 +156,7 @@ class LLFloaterPathfindingObjects : public LLFloater
boost::signals2::connection mSelectionUpdateSlot; boost::signals2::connection mSelectionUpdateSlot;
boost::signals2::connection mRegionBoundaryCrossingSlot; boost::signals2::connection mRegionBoundaryCrossingSlot;
LLAgent::god_level_change_slot_t mGodLevelChangeSlot;
public: public:
LLRootHandle<LLFloaterPathfindingObjects> mSelfHandle; LLRootHandle<LLFloaterPathfindingObjects> mSelfHandle;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment