*myFileInDir = myFileInfo.path();
*myFileOutDir = myFileInfo.path();
selectMedFileLineEdit->setText(myFileInfo.fileName());
- selectOutMedFileLineEdit->setText(myFileInfo.fileName());
+ QString outF = QString( remove_extension(myFileInfo.fileName().toStdString() ).c_str() )+QString(".adapt.med");
+ selectOutMedFileLineEdit->setText(outF);
onLocalSelected(myFileInfo.filePath());
}
return ListeChamp;
}
-
+std::string remove_extension(const std::string& filename) {
+ size_t lastdot = filename.find_last_of(".");
+ if (lastdot == std::string::npos) return filename;
+ return filename.substr(0, lastdot);
+}
QString lireNomMaillage(QString aFile);\r
QString lireNomMaillage2(med_idt medIdt,int meshId);\r
med_idt OuvrirFichier(QString aFile);\r
+std::string remove_extension(const std::string& filename);\r
\r
//=================================================================================\r
// class : SMESHGUI_MgAdaptDlg\r