mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
* #14889: Do not change main window when importing well picks * #14889: Fix clipped bottom of plots in dock windows * #14889: Add Create RFT Correlation Report to Ensemble Correlation Plots menu * #14889: Show imported observed FMU RFT data as table * #14889: Use time step from source RFT plot in RFT correlation report * #14889: Show observed data in RFT cross plot when no RFT samples are available * #14889: Keep RFT plot zoom when toggling formation in RFT correlation report * #14889: Do not change main window when importing formations * #14889: Use general delete for observed data and improve FMU RFT data name
71 lines
3.0 KiB
C++
71 lines
3.0 KiB
C++
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (C) 2017- Statoil ASA
|
|
//
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
//
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
// for more details.
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "RicWellPathFormationsImportFileFeature.h"
|
|
|
|
#include "RiaApplication.h"
|
|
|
|
#include "RimMainPlotCollection.h"
|
|
#include "RimProject.h"
|
|
|
|
#include "Riu3DMainWindowTools.h"
|
|
#include "RiuFileDialogTools.h"
|
|
|
|
#include <QAction>
|
|
#include <QFileInfo>
|
|
|
|
CAF_CMD_SOURCE_INIT( RicWellPathFormationsImportFileFeature, "RicWellPathFormationsImportFileFeature" );
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
void RicWellPathFormationsImportFileFeature::onActionTriggered( bool isChecked )
|
|
{
|
|
// Open dialog box to select well path formations files
|
|
RiaApplication* app = RiaApplication::instance();
|
|
QString defaultDir = app->lastUsedDialogDirectory( "WELLPATHFORMATIONS_DIR" );
|
|
QStringList wellPathFormationsFilePaths = RiuFileDialogTools::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
|
"Import Well Picks",
|
|
defaultDir,
|
|
"Well Picks (*.csv);;All Files (*.*)" );
|
|
|
|
if ( wellPathFormationsFilePaths.empty() ) return;
|
|
|
|
// Remember the path to next time
|
|
app->setLastUsedDialogDirectory( "WELLPATHFORMATIONS_DIR", QFileInfo( wellPathFormationsFilePaths.last() ).absolutePath() );
|
|
|
|
app->addWellPathFormationsToModel( wellPathFormationsFilePaths );
|
|
|
|
RimProject* project = app->project();
|
|
|
|
if ( project )
|
|
{
|
|
project->scheduleCreateDisplayModelAndRedrawAllViews();
|
|
RimMainPlotCollection::current()->updatePlotsWithFormations();
|
|
}
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
void RicWellPathFormationsImportFileFeature::setupActionLook( QAction* actionToSetup )
|
|
{
|
|
actionToSetup->setText( "Import Well Picks" );
|
|
actionToSetup->setIcon( QIcon( ":/Formations16x16.png" ) );
|
|
}
|