diff options
Diffstat (limited to 'indra/newview/llfloaterpathfindingconsole.cpp')
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
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<LLCheckBoxCtrl>("show_world_movables_only"); - mShowWorldMovablesOnlyCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onRenderWorldMovablesOnly, this)); llassert(mShowWorldMovablesOnlyCheckBox != NULL); + mShowWorldMovablesOnlyCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldMovablesOnlySet, this)); mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("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) |