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

Function SwitchToLibrary

trunk/win/Source/BT_Util.cpp:7794–7814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7792}
7793
7794void SwitchToLibrary(QSharedPointer<Library> library)
7795{
7796 if (!library)
7797 return;
7798
7799 if (scnManager->getCurrentLibrary() == library)
7800 return;
7801
7802 bool createDefaultObjects = false;
7803 if (winOS->GetLibraryManager())
7804 {
7805 createDefaultObjects = library == winOS->GetLibraryManager()->getDesktopLibrary();
7806 }
7807
7808 GLOBAL(skipSavingSceneFile) = false;
7809 SaveSceneToFile();
7810 ClearBumpTop();
7811 scnManager->setCurrentLibrary(library);
7812 if (!LoadSceneFromFile())
7813 CreateBumpObjectsFromWorkingDirectory(createDefaultObjects);
7814}
7815
7816void RemoveLibrary(QSharedPointer<Library>& library)
7817{

Callers 3

executeMethod · 0.85
onSelectMethod · 0.85
messageProcMethod · 0.85

Calls 8

SaveSceneToFileFunction · 0.85
ClearBumpTopFunction · 0.85
LoadSceneFromFileFunction · 0.85
getCurrentLibraryMethod · 0.80
GetLibraryManagerMethod · 0.80
getDesktopLibraryMethod · 0.80
setCurrentLibraryMethod · 0.80

Tested by

no test coverage detected