mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#906 Las Export: Fixed issue with TVDRKB export and improved UI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user