| 65 | } |
| 66 | |
| 67 | void AasFileControl::ensureAasFileLoaded() |
| 68 | { |
| 69 | if (_aasFile) return; |
| 70 | |
| 71 | ArchiveTextFilePtr file = GlobalFileSystem().openTextFileInAbsolutePath(_info.absolutePath); |
| 72 | |
| 73 | if (file) |
| 74 | { |
| 75 | std::istream stream(&file->getInputStream()); |
| 76 | map::IAasFileLoaderPtr loader = GlobalAasFileManager().getLoaderForStream(stream); |
| 77 | |
| 78 | if (loader && loader->canLoad(stream)) |
| 79 | { |
| 80 | stream.seekg(0, std::ios_base::beg); |
| 81 | |
| 82 | _aasFile = loader->loadFromStream(stream); |
| 83 | |
| 84 | // Construct a renderable to attach to the rendersystem |
| 85 | _renderable.setAasFile(_aasFile); |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | void AasFileControl::onToggle(wxCommandEvent& ev) |
| 91 | { |
nothing calls this directly
no test coverage detected