- //std::string aTmpDir = aStudy->GetTmpDir("", false);//true );
- theFiles.append(QString(aTmpDir.c_str()));
-
- aWorkShop->saveDocument(QString(aTmpDir.c_str()), aFileNames);
- std::list<std::string>::iterator aIt;
- for (aIt = aFileNames.begin(); aIt != aFileNames.end(); ++aIt) {
- QString aName((*aIt).c_str());
- aName.replace(QChar('\\'), QChar('/'));
- int aN = aName.lastIndexOf('/');
- theFiles.append(aName.right(aName.length() - aN - 1));
- }
+ QString aTmp = QString(aTmpDir.c_str());
+ theFiles.append(aTmp);
+
+ SessionPtr aMgr = ModelAPI_Session::get();
+ if (aMgr->isAutoUpdateBlocked())
+ aMgr->blockAutoUpdate(false);
+
+ //aWorkShop->saveDocument(QString(aTmpDir.c_str()), aFileNames);
+ aWorkShop->setCurrentDataFile(aTmp + "shaper.shaper");
+ aWorkShop->onSave();
+ QString aName = aWorkShop->currentDataFile();
+ aName.replace(QChar('\\'), QChar('/'));
+ int aN = aName.lastIndexOf('/');
+ theFiles.append(aName.right(aName.length() - aN - 1));
+