void StCADViewerGUI::doOpenFile(const size_t ) { StGLOpenFile* aDialog = new StGLOpenFile(this, tr(DIALOG_OPEN_FILE), tr(BUTTON_CLOSE)); aDialog->setMimeList(StCADLoader::ST_CAD_MIME_LIST); #if defined(_WIN32) // #else aDialog->addHotItem("/", "Root"); #endif aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_SdCard)); aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Downloads)); aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Pictures)); aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Photos)); aDialog->signals.onFileSelected = stSlot(myPlugin, &StCADViewer::doOpen1FileFromGui); if(myPlugin->params.LastFolder.isEmpty()) { StHandle<StFileNode> aCurrFile = myPlugin->myPlayList->getCurrentFile(); if(!aCurrFile.isNull()) { myPlugin->params.LastFolder = aCurrFile->isEmpty() ? aCurrFile->getFolderPath() : aCurrFile->getValue(0)->getFolderPath(); } } aDialog->openFolder(myPlugin->params.LastFolder); setModalDialog(aDialog); }