mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 09:00:20 -05:00
#14101 Move Fault Distance to a case-level Data Analytics folder above the first view
This commit is contained in:
1 parent
2fc99a8ecb
commit
74c507a5fa
6 files changed
+59
-22
No files matched your search
@@ -61,6 +61,8 @@
|
||||
#include "RimEclipseStatisticsCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseViewCollection.h"
|
||||
#include "RimFaultDistanceResult.h"
|
||||
#include "RimFaultDistanceResultCollection.h"
|
||||
#include "RimFaultInViewCollection.h"
|
||||
#include "RimGridCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
@@ -132,6 +134,9 @@ RimEclipseCase::RimEclipseCase()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellTargetMappings, "WellTargetMappings", "Well Target Mappings" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_faultDistanceResultCollection, "FaultDistanceResultCollection", "Fault Distance" );
|
||||
m_faultDistanceResultCollection = new RimFaultDistanceResultCollection;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_resultAliasList, "ResultAliasNames", "Result Name Aliases" );
|
||||
m_resultAliasList.uiCapability()->setUiEditorTypeName( caf::PdmUiTableViewEditor::uiEditorTypeName() );
|
||||
m_resultAliasList.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LabelPosition::HIDDEN );
|
||||
@@ -666,6 +671,26 @@ void RimEclipseCase::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
|
||||
{
|
||||
if ( uiConfigName == "MainWindow.ProjectTree" )
|
||||
{
|
||||
const bool hasFaultDistance = m_faultDistanceResultCollection() && !m_faultDistanceResultCollection()->isEmpty();
|
||||
const bool hasWellTargets = !m_wellTargetMappings.empty();
|
||||
if ( hasFaultDistance || hasWellTargets )
|
||||
{
|
||||
auto* dataAnalytics = uiTreeOrdering.add( "Data Analytics", ":/Folder.png" );
|
||||
|
||||
if ( hasFaultDistance )
|
||||
{
|
||||
for ( auto* result : m_faultDistanceResultCollection()->items() )
|
||||
{
|
||||
dataAnalytics->add( result );
|
||||
}
|
||||
}
|
||||
|
||||
for ( RimWellTargetMapping* wellTargetMapping : m_wellTargetMappings )
|
||||
{
|
||||
dataAnalytics->add( wellTargetMapping );
|
||||
}
|
||||
}
|
||||
|
||||
for ( auto view : m_viewCollection->views() )
|
||||
{
|
||||
uiTreeOrdering.add( view );
|
||||
@@ -680,8 +705,6 @@ void RimEclipseCase::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
|
||||
{
|
||||
uiTreeOrdering.add( m_dataFilterCollection() );
|
||||
}
|
||||
|
||||
uiTreeOrdering.add( &m_wellTargetMappings );
|
||||
}
|
||||
else if ( uiConfigName == "MainWindow.DataSources" )
|
||||
{
|
||||
@@ -1432,3 +1455,11 @@ void RimEclipseCase::addWellTargetMapping( RimWellTargetMapping* generator )
|
||||
m_wellTargetMappings.push_back( generator );
|
||||
generator->updateResultDefinition();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFaultDistanceResultCollection* RimEclipseCase::faultDistanceResults() const
|
||||
{
|
||||
return m_faultDistanceResultCollection;
|
||||
}
|
||||
Reference in new issue
Block a user