From 8b7b9ce31c7f055708501f788ef4ed2241a2c126 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 22 May 2012 11:20:47 -0700 Subject: PATH-641: BUGFIX Resolving issue with show world movables only not working as expected. --- indra/newview/llfloaterpathfindingconsole.cpp | 31 ++++++++++++++++----------- indra/newview/llfloaterpathfindingconsole.h | 3 ++- 2 files changed, 21 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index f6eb40abdc..426ea629ee 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -101,8 +101,8 @@ BOOL LLFloaterPathfindingConsole::postBuild() mShowWorldCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldSet, this)); mShowWorldMovablesOnlyCheckBox = findChild("show_world_movables_only"); - mShowWorldMovablesOnlyCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onRenderWorldMovablesOnly, this)); llassert(mShowWorldMovablesOnlyCheckBox != NULL); + mShowWorldMovablesOnlyCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldMovablesOnlySet, this)); mShowNavMeshCheckBox = findChild("show_navmesh"); llassert(mShowNavMeshCheckBox != NULL); @@ -542,6 +542,12 @@ LLFloaterPathfindingConsole::~LLFloaterPathfindingConsole() void LLFloaterPathfindingConsole::onShowWorldSet() { setWorldRenderState(); + updateRenderablesObjects(); +} + +void LLFloaterPathfindingConsole::onShowWorldMovablesOnlySet() +{ + updateRenderablesObjects(); } void LLFloaterPathfindingConsole::onShowNavMeshSet() @@ -603,17 +609,6 @@ void LLFloaterPathfindingConsole::onClearPathClicked() clearPath(); } -void LLFloaterPathfindingConsole::onRenderWorldMovablesOnly() -{ - if ( mShowWorldMovablesOnlyCheckBox->get() ) - { - gPipeline.hidePermanentObjects( mRenderableRestoreList ); - } - else - { - cleanupRenderableRestoreItems(); - } -} void LLFloaterPathfindingConsole::onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus) { switch (pNavMeshZoneRequestStatus) @@ -737,6 +732,18 @@ void LLFloaterPathfindingConsole::setNavMeshRenderState() mShowNavMeshWalkabilityComboBox->setEnabled(renderNavMesh); } +void LLFloaterPathfindingConsole::updateRenderablesObjects() +{ + if ( isRenderWorldMovablesOnly() ) + { + gPipeline.hidePermanentObjects( mRenderableRestoreList ); + } + else + { + cleanupRenderableRestoreItems(); + } +} + void LLFloaterPathfindingConsole::updateControlsOnConsoleState() { switch (mConsoleState) diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index 348deeed00..8acd0fa53e 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -116,6 +116,7 @@ private: virtual ~LLFloaterPathfindingConsole(); void onShowWorldSet(); + void onShowWorldMovablesOnlySet(); void onShowNavMeshSet(); void onShowWalkabilitySet(); void onViewCharactersClicked(); @@ -126,7 +127,6 @@ private: void onCharacterWidthSet(); void onCharacterTypeSwitch(); void onClearPathClicked(); - void onRenderWorldMovablesOnly(); void onNavMeshZoneCB(LLPathfindingNavMeshZone::ENavMeshZoneRequestStatus pNavMeshZoneRequestStatus); void onAgentStateCB(LLPathfindingManager::EAgentState pAgentState); @@ -137,6 +137,7 @@ private: void setConsoleState(EConsoleState pConsoleState); void setWorldRenderState(); void setNavMeshRenderState(); + void updateRenderablesObjects(); void updateControlsOnConsoleState(); void updateStatusOnConsoleState(); -- cgit v1.2.3