From e78266e9378bdd19ea4a8f7833cf39e59d2faecc Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 15 Jun 2012 12:45:41 -0700 Subject: 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(). --- indra/newview/llfloaterpathfindingobjects.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'indra/newview/llfloaterpathfindingobjects.cpp') 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(); -- cgit v1.2.3