MCPcopy Create free account
hub / github.com/bumptop/BumpTop / removeObject

Method removeObject

trunk/win/Source/BT_SceneManager.cpp:257–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257bool SceneManager::removeObject(BumpObject *newObject)
258{
259 assert(GetCurrentThreadId() == _threadId);
260 int indx = -1;
261
262 for (uint i = 0; i < _bumpObjects.size(); i++)
263 {
264 // We found our objects, return the index
265 if (_bumpObjects[i] == newObject)
266 indx = i;
267 if (_bumpObjects[i]->isBumpObjectType(BumpActor) && newObject == ((Actor *)_bumpObjects[i])->getObjectToMimic())
268 ((Actor *)_bumpObjects[i])->setObjectToMimic(NULL);
269 }
270
271 if (indx > -1)
272 {
273 // Remove the object from our system
274 _bumpObjects.erase(_bumpObjects.begin() + uint(indx));
275
276 // If we're in infinite desktop mode, update the list of all actors
277
278 if (GLOBAL(isInInfiniteDesktopMode))
279 {
280 cam->unwatchActor(newObject);
281 }
282
283 // clear the camera slideshow mode if the item being removed is currently being watched
284 if (cam->isWatchedActorHighlighted(newObject))
285 Key_DisableSlideShow();
286
287 return true;
288 }
289
290 return false;
291}
292
293int SceneManager::isRegistered(BumpObject *object)
294{

Callers 11

uninitializeWidgetMethod · 0.45
~PhotoFrameActorMethod · 0.45
~FileSystemPileMethod · 0.45
breakPileMethod · 0.45
folderizeMethod · 0.45
~SceneManagerMethod · 0.45
setWorkingDirectoryMethod · 0.45
setCurrentLibraryMethod · 0.45
onFileNameChangedMethod · 0.45
~RenderableMethod · 0.45
~BumpObjectMethod · 0.45

Calls 7

assertClass · 0.85
Key_DisableSlideShowFunction · 0.85
unwatchActorMethod · 0.80
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected