#906 Las Export: Fixed issue with TVDRKB export and improved UI

This commit is contained in:
Magne Sjaastad
2016-10-14 13:30:04 +02:00
parent 929c1d1633
commit 71f1966c1c
6 changed files with 241 additions and 12 deletions

View File

@@ -55,21 +55,39 @@ void RicExportToLasFileFeature::onActionTriggered(bool isChecked)
QString projectFolder = app->currentProjectPath();
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("WELL_LOGS_DIR", projectFolder);
RigLasFileExporter lasExporter(curves);
RicExportToLasFileResampleUi featureUi;
featureUi.exportFolder = defaultDir;
{
std::vector<QString> wellNames;
std::vector<double> rkbDiffs;
lasExporter.wellPathsAndRkbDiff(&wellNames, &rkbDiffs);
featureUi.setRkbDiffs(wellNames, rkbDiffs);
}
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Export Curve Data to LAS file(s)", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
propertyDialog.resize(QSize(400, 200));
if (propertyDialog.exec() == QDialog::Accepted &&
!featureUi.exportFolder().isEmpty())
{
RigLasFileExporter lasExporter(curves);
if (featureUi.activateResample)
{
lasExporter.setResamplingInterval(featureUi.resampleInterval());
}
if (featureUi.exportTvdrkb)
{
std::vector<QString> wellNames;
std::vector<double> rkbDiffs;
lasExporter.wellPathsAndRkbDiff(&wellNames, &rkbDiffs);
std::vector<double> userDefRkbDiff;
featureUi.tvdrkbDiffForWellPaths(&userDefRkbDiff);
lasExporter.setRkbDiffs(wellNames, userDefRkbDiff);
}
lasExporter.writeToFolder(featureUi.exportFolder());
// Remember the path to next time