| 7792 | } |
| 7793 | |
| 7794 | void 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 | |
| 7816 | void RemoveLibrary(QSharedPointer<Library>& library) |
| 7817 | { |
no test coverage detected