diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-06-15 12:45:41 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-06-15 12:45:41 -0700 |
commit | e78266e9378bdd19ea4a8f7833cf39e59d2faecc (patch) | |
tree | 60d0ffd21a89aae5e62a40940501a5593a57073b /indra/newview/llfloaterpathfindingobjects.cpp | |
parent | 9cac312f57391792e9fce380c2c38ae4060ae1d7 (diff) |
BUGFIX: Correcting a behavior where moving the cursor over a selected object inappropriately called updateControls(). Fix was to break the updateControl() functionality into two separate handlers updateControlsOnScrollListChange() and updateControlsOnInWorldSelectionChange().
Diffstat (limited to 'indra/newview/llfloaterpathfindingobjects.cpp')
-rw-r--r-- | indra/newview/llfloaterpathfindingobjects.cpp | 27 |
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(); |