Well Log Track: show "New LAS file curve" menu item for Osdu well logs.

This commit is contained in:
Kristian Bendiksen 2024-07-12 16:04:52 +02:00
parent 151f433124
commit a8004870d4
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogFileCurveFeature, "RicNewWellLogFileCurveFeatu
bool RicNewWellLogFileCurveFeature::isCommandEnabled() const
{
if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false;
return ( caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellLogTrack>() != nullptr && wellLogFilesAvailable() ) ||
return ( caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellLogTrack>() != nullptr && wellLogsAvailable() ) ||
RicWellLogTools::selectedWellPathWithLog() != nullptr;
}
@ -91,14 +91,14 @@ void RicNewWellLogFileCurveFeature::setupActionLook( QAction* actionToSetup )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewWellLogFileCurveFeature::wellLogFilesAvailable()
bool RicNewWellLogFileCurveFeature::wellLogsAvailable()
{
auto wellPathCollection = RimTools::wellPathCollection();
if ( wellPathCollection )
{
for ( auto wellPath : wellPathCollection->allWellPaths() )
{
if ( !wellPath->wellLogFiles().empty() )
if ( !wellPath->wellLogs().empty() )
{
return true;
}

View File

@ -36,5 +36,5 @@ protected:
void setupActionLook( QAction* actionToSetup ) override;
private:
static bool wellLogFilesAvailable();
static bool wellLogsAvailable();
};