mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
RFT segment plot adjustments (#9912)
* Delete RFT plot when associated case is deleted * Rename * Hide track/curves with no data
This commit is contained in:
@@ -60,6 +60,8 @@ RimPlotCurve::RimPlotCurve()
|
||||
CAF_PDM_InitField( &m_showCurve, "Show", true, "Show curve" );
|
||||
m_showCurve.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_autoCheckStateBasedOnCurveData, "AutoCheckStateBasedOnCurveData", false, "Hide Curve If No Curve Data" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_curveName, "CurveName", "" );
|
||||
|
||||
auto templateText = QString( "%1, %2" ).arg( RiaDefines::namingVariableCase() ).arg( RiaDefines::namingVariableResultName() );
|
||||
@@ -158,6 +160,10 @@ void RimPlotCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField, co
|
||||
if ( m_showCurve() ) loadDataAndUpdate( false );
|
||||
visibilityChanged.send( m_showCurve() );
|
||||
}
|
||||
else if ( changedField == &m_autoCheckStateBasedOnCurveData )
|
||||
{
|
||||
updateCheckStateBasedOnCurveData();
|
||||
}
|
||||
else if ( changedField == &m_curveName )
|
||||
{
|
||||
updateCurveNameAndUpdatePlotLegendAndTitle();
|
||||
@@ -359,7 +365,7 @@ cvf::Color3f RimPlotCurve::color() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPlotCurve::isCurveVisible() const
|
||||
bool RimPlotCurve::isChecked() const
|
||||
{
|
||||
return m_showCurve;
|
||||
}
|
||||
@@ -367,9 +373,27 @@ bool RimPlotCurve::isCurveVisible() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setCurveVisibility( bool visible )
|
||||
void RimPlotCurve::setCheckState( bool isChecked )
|
||||
{
|
||||
m_showCurve = visible;
|
||||
m_showCurve = isChecked;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setAutoCheckStateBasedOnCurveData( bool enable )
|
||||
{
|
||||
m_autoCheckStateBasedOnCurveData = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::updateCheckStateBasedOnCurveData()
|
||||
{
|
||||
if ( !m_autoCheckStateBasedOnCurveData ) return;
|
||||
|
||||
setCheckState( isAnyCurveDataPresent() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -861,6 +885,14 @@ void RimPlotCurve::updateAxisInPlot( RiuPlotAxis plotAxis )
|
||||
if ( m_plotCurve ) m_plotCurve->setYAxis( plotAxis );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPlotCurve::isAnyCurveDataPresent() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user