#3325 Well Path export. Command file command for exporting well paths

This commit is contained in:
Bjørn Erik Jensen
2018-09-25 09:09:13 +02:00
parent f61b82dd35
commit c422ffc6ed
10 changed files with 142 additions and 26 deletions

View File

@@ -83,6 +83,13 @@ void RicExportSelectedWellPathsFeature::exportWellPath(const RimWellPath* wellPa
QFilePtr RicExportSelectedWellPathsFeature::openFileForExport(const QString& folderName, const QString& fileName)
{
QDir exportFolder = QDir(folderName);
if (!exportFolder.exists())
{
bool createdPath = exportFolder.mkpath(".");
if (createdPath)
RiaLogging::info("Created export folder " + folderName);
}
QString filePath = exportFolder.filePath(fileName);
QFilePtr exportFile(new QFile(filePath));
if (!exportFile->open(QIODevice::WriteOnly))