| 379 | //----------------------------------------------------------------------------- |
| 380 | |
| 381 | void GuiInspector::removeInspectObject( SimObject* object ) |
| 382 | { |
| 383 | const U32 numTargets = mTargets.size(); |
| 384 | for( U32 i = 0; i < numTargets; ++ i ) |
| 385 | if( mTargets[ i ] == object ) |
| 386 | { |
| 387 | // Delete all inspector data *before* removing the target so that apply calls |
| 388 | // triggered by edit controls losing focus will not find the inspect object |
| 389 | // gone. |
| 390 | |
| 391 | clearGroups(); |
| 392 | |
| 393 | #ifdef DEBUG_SPEW |
| 394 | Platform::outputDebugString( "[GuiInspector] Removing %i:%s (%s) from inspect set", |
| 395 | object->getId(), object->getClassName(), object->getName() ); |
| 396 | #endif |
| 397 | |
| 398 | mTargets.erase( i ); |
| 399 | clearNotify( object ); |
| 400 | |
| 401 | // Refresh the inspector except if the system is going down. |
| 402 | |
| 403 | if( !Sim::isShuttingDown() ) |
| 404 | refresh(); |
| 405 | |
| 406 | return; |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | //----------------------------------------------------------------------------- |
| 411 |
no test coverage detected