mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Well Log Track: show "New LAS file curve" menu item for Osdu well logs.
This commit is contained in:
parent
151f433124
commit
a8004870d4
@ -47,7 +47,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogFileCurveFeature, "RicNewWellLogFileCurveFeatu
|
|||||||
bool RicNewWellLogFileCurveFeature::isCommandEnabled() const
|
bool RicNewWellLogFileCurveFeature::isCommandEnabled() const
|
||||||
{
|
{
|
||||||
if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false;
|
if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false;
|
||||||
return ( caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellLogTrack>() != nullptr && wellLogFilesAvailable() ) ||
|
return ( caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellLogTrack>() != nullptr && wellLogsAvailable() ) ||
|
||||||
RicWellLogTools::selectedWellPathWithLog() != nullptr;
|
RicWellLogTools::selectedWellPathWithLog() != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,14 +91,14 @@ void RicNewWellLogFileCurveFeature::setupActionLook( QAction* actionToSetup )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicNewWellLogFileCurveFeature::wellLogFilesAvailable()
|
bool RicNewWellLogFileCurveFeature::wellLogsAvailable()
|
||||||
{
|
{
|
||||||
auto wellPathCollection = RimTools::wellPathCollection();
|
auto wellPathCollection = RimTools::wellPathCollection();
|
||||||
if ( wellPathCollection )
|
if ( wellPathCollection )
|
||||||
{
|
{
|
||||||
for ( auto wellPath : wellPathCollection->allWellPaths() )
|
for ( auto wellPath : wellPathCollection->allWellPaths() )
|
||||||
{
|
{
|
||||||
if ( !wellPath->wellLogFiles().empty() )
|
if ( !wellPath->wellLogs().empty() )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -36,5 +36,5 @@ protected:
|
|||||||
void setupActionLook( QAction* actionToSetup ) override;
|
void setupActionLook( QAction* actionToSetup ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool wellLogFilesAvailable();
|
static bool wellLogsAvailable();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user