mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Disable streamlines icon in explorer for eclipse input cases. (#7697)
This commit is contained in:
parent
78e4e1cd5c
commit
1465b179c5
@ -1935,7 +1935,9 @@ void RimEclipseView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
|
||||
uiTreeOrdering.add( cellEdgeResult() );
|
||||
uiTreeOrdering.add( elementVectorResult() );
|
||||
uiTreeOrdering.add( faultResultSettings() );
|
||||
uiTreeOrdering.add( &m_streamlineCollection );
|
||||
|
||||
if ( m_streamlineCollection->shouldBeAvailable() ) uiTreeOrdering.add( &m_streamlineCollection );
|
||||
|
||||
addRequiredUiTreeObjects( uiTreeOrdering );
|
||||
|
||||
uiTreeOrdering.add( wellCollection() );
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "RigTracerPoint.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseInputCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
#include "RimStreamline.h"
|
||||
@ -196,6 +197,16 @@ bool RimStreamlineInViewCollection::isActive() const
|
||||
return m_isActive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimStreamlineInViewCollection::shouldBeAvailable() const
|
||||
{
|
||||
if ( ( eclipseCase() == nullptr ) || ( eclipseCase()->eclipseCaseData() == nullptr ) ) return false;
|
||||
|
||||
return ( dynamic_cast<RimEclipseInputCase*>( eclipseCase() ) == nullptr );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -82,6 +82,8 @@ public:
|
||||
double scaleFactor() const;
|
||||
size_t tracerLength() const;
|
||||
|
||||
bool shouldBeAvailable() const;
|
||||
|
||||
bool isActive() const;
|
||||
|
||||
void refresh();
|
||||
|
Loading…
Reference in New Issue
Block a user