MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / removeInstance

Method removeInstance

Engine/AppManager.cpp:1210–1231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1208}
1209
1210void
1211AppManager::removeInstance(int appID)
1212{
1213 int newApp = -1;
1214 {
1215 QMutexLocker k(&_imp->_appInstancesMutex);
1216 for (AppInstanceVec::iterator it = _imp->_appInstances.begin(); it != _imp->_appInstances.end(); ++it) {
1217 if ( (*it)->getAppID() == appID ) {
1218 _imp->_appInstances.erase(it);
1219 break;
1220 }
1221 }
1222
1223 if ( !_imp->_appInstances.empty() ) {
1224 newApp = _imp->_appInstances.front()->getAppID();
1225 }
1226 }
1227
1228 if (newApp != -1) {
1229 setAsTopLevelInstance(newApp);
1230 }
1231}
1232
1233AppManager::AppTypeEnum
1234AppManager::getAppType() const

Callers 1

Calls 5

emptyMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
getAppIDMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected