summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingobjects.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-06-15 15:45:10 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-06-15 15:45:10 -0700
commit84b1f2f8c208c32429e3aba38c59c553ba39ede9 (patch)
tree2d39e477991c06bf7e5142b89fd8c658639baf83 /indra/newview/llfloaterpathfindingobjects.cpp
parentc135a692b03e6aad9e12e421edafed83c5489315 (diff)
parent5d32507959a1ec36dfc7b5f7884c7b3196d96c26 (diff)
Merge
Diffstat (limited to 'indra/newview/llfloaterpathfindingobjects.cpp')
-rw-r--r--indra/newview/llfloaterpathfindingobjects.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index 6f183c78b1..14fa0ac428 100644
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -348,7 +348,7 @@ void LLFloaterPathfindingObjects::rebuildObjectsScrollList()
mObjectsScrollList->selectMultiple(selectedUUIDs);
mObjectsScrollList->setScrollPos(origScrollPosition);
- updateControls();
+ updateControlsOnScrollListChange();
}
LLSD LLFloaterPathfindingObjects::convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr)
@@ -368,11 +368,17 @@ void LLFloaterPathfindingObjects::rebuildScrollListAfterAvatarNameLoads(const LL
}
}
-void LLFloaterPathfindingObjects::updateControls()
+void LLFloaterPathfindingObjects::updateControlsOnScrollListChange()
{
updateMessagingStatus();
- updateStateOnListActionControls();
- updateStateOnEditFields();
+ updateStateOnListControls();
+ selectScrollListItemsInWorld();
+ updateStateOnActionControls();
+}
+
+void LLFloaterPathfindingObjects::updateControlsOnInWorldSelectionChange()
+{
+ updateStateOnActionControls();
}
S32 LLFloaterPathfindingObjects::getNameColumnIndex() const
@@ -491,7 +497,7 @@ LLFloaterPathfindingObjects::EMessagingState LLFloaterPathfindingObjects::getMes
void LLFloaterPathfindingObjects::setMessagingState(EMessagingState pMessagingState)
{
mMessagingState = pMessagingState;
- updateControls();
+ updateControlsOnScrollListChange();
}
void LLFloaterPathfindingObjects::onRefreshObjectsClicked()
@@ -539,13 +545,12 @@ void LLFloaterPathfindingObjects::onTeleportClicked()
void LLFloaterPathfindingObjects::onScrollListSelectionChanged()
{
- updateOnScrollListChange();
- updateControls();
+ updateControlsOnScrollListChange();
}
void LLFloaterPathfindingObjects::onInWorldSelectionListChanged()
{
- updateControls();
+ updateControlsOnInWorldSelectionChange();
}
void LLFloaterPathfindingObjects::onRegionBoundaryCrossed()
@@ -632,7 +637,7 @@ void LLFloaterPathfindingObjects::updateMessagingStatus()
mMessagingStatus->setText((LLStringExplicit)statusText, styleParams);
}
-void LLFloaterPathfindingObjects::updateStateOnListActionControls()
+void LLFloaterPathfindingObjects::updateStateOnListControls()
{
switch (getMessagingState())
{
@@ -665,7 +670,7 @@ void LLFloaterPathfindingObjects::updateStateOnListActionControls()
}
}
-void LLFloaterPathfindingObjects::updateStateOnEditFields()
+void LLFloaterPathfindingObjects::updateStateOnActionControls()
{
int numSelectedItems = mObjectsScrollList->getNumSelected();
bool isEditEnabled = (numSelectedItems > 0);
@@ -678,7 +683,7 @@ void LLFloaterPathfindingObjects::updateStateOnEditFields()
mTeleportButton->setEnabled(numSelectedItems == 1);
}
-void LLFloaterPathfindingObjects::updateOnScrollListChange()
+void LLFloaterPathfindingObjects::selectScrollListItemsInWorld()
{
mObjectsSelection.clear();
LLSelectMgr::getInstance()->deselectAll();