mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
9437 fix missing summary sub plot update
Summary plot: fix missing sub plot title updates. Janitor: improve RiuPlotWidget interface.
This commit is contained in:
parent
14db528c98
commit
99553382f5
@ -209,6 +209,7 @@ void RimSummaryMultiPlot::insertPlot( RimPlot* plot, size_t index )
|
||||
sumPlot->axisChanged.connect( this, &RimSummaryMultiPlot::onSubPlotAxisChanged );
|
||||
sumPlot->curvesChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged );
|
||||
sumPlot->plotZoomedByUser.connect( this, &RimSummaryMultiPlot::onSubPlotZoomed );
|
||||
sumPlot->titleChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged );
|
||||
|
||||
bool isMinMaxOverridden = m_axisRangeAggregation() != AxisRangeAggregation::NONE;
|
||||
setAutoValueStatesForPlot( sumPlot, isMinMaxOverridden, m_autoAdjustAppearance() );
|
||||
@ -550,9 +551,9 @@ void RimSummaryMultiPlot::updatePlotWindowTitle()
|
||||
setMultiPlotTitle( title );
|
||||
}
|
||||
|
||||
if ( m_autoSubPlotTitle )
|
||||
for ( auto plot : summaryPlots() )
|
||||
{
|
||||
for ( auto plot : summaryPlots() )
|
||||
if ( m_autoSubPlotTitle )
|
||||
{
|
||||
auto subPlotNameHelper = plot->plotTitleHelper();
|
||||
|
||||
@ -563,11 +564,11 @@ void RimSummaryMultiPlot::updatePlotWindowTitle()
|
||||
auto plotName = subPlotNameHelper->aggregatedPlotTitle( *m_nameHelper );
|
||||
plot->setPlotTitleVisible( true );
|
||||
plot->setDescription( plotName );
|
||||
plot->updatePlotTitle();
|
||||
}
|
||||
|
||||
if ( !m_viewer.isNull() ) m_viewer->scheduleTitleUpdate();
|
||||
plot->updatePlotTitle();
|
||||
}
|
||||
|
||||
if ( !m_viewer.isNull() ) m_viewer->scheduleTitleUpdate();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -715,6 +716,7 @@ void RimSummaryMultiPlot::initAfterRead()
|
||||
plot->axisChanged.connect( this, &RimSummaryMultiPlot::onSubPlotAxisChanged );
|
||||
plot->curvesChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged );
|
||||
plot->plotZoomedByUser.connect( this, &RimSummaryMultiPlot::onSubPlotZoomed );
|
||||
plot->titleChanged.connect( this, &RimSummaryMultiPlot::onSubPlotChanged );
|
||||
}
|
||||
updateStepDimensionFromDefault();
|
||||
}
|
||||
|
@ -105,6 +105,7 @@ RimSummaryPlot::RimSummaryPlot( bool isCrossPlot )
|
||||
, curvesChanged( this )
|
||||
, axisChanged( this )
|
||||
, plotZoomedByUser( this )
|
||||
, titleChanged( this )
|
||||
, m_isValid( true )
|
||||
{
|
||||
CAF_PDM_InitScriptableObject( "Summary Plot", ":/SummaryPlotLight16x16.png", "", "A Summary Plot" );
|
||||
@ -1485,6 +1486,8 @@ void RimSummaryPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
c->updateCurveNameNoLegendUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
titleChanged.send();
|
||||
}
|
||||
|
||||
if ( changedField == &m_showPlotLegends ) updateLegend();
|
||||
|
@ -82,6 +82,7 @@ public:
|
||||
caf::Signal<> curvesChanged;
|
||||
caf::Signal<RimSummaryPlot*> axisChanged;
|
||||
caf::Signal<> plotZoomedByUser;
|
||||
caf::Signal<> titleChanged;
|
||||
|
||||
public:
|
||||
RimSummaryPlot( bool isCrossPlot = false );
|
||||
|
@ -115,8 +115,8 @@ public:
|
||||
|
||||
virtual void setPlotTitle( const QString& plotTitle ) = 0;
|
||||
const QString& plotTitle() const;
|
||||
void setPlotTitleEnabled( bool enabled );
|
||||
bool plotTitleEnabled() const;
|
||||
virtual void setPlotTitleEnabled( bool enabled ) = 0;
|
||||
virtual bool plotTitleEnabled() const = 0;
|
||||
virtual void setPlotTitleFontSize( int titleFontSize ) = 0;
|
||||
|
||||
virtual void setLegendFontSize( int fontSize ) = 0;
|
||||
|
@ -112,8 +112,8 @@ public:
|
||||
|
||||
void setPlotTitle( const QString& plotTitle ) override;
|
||||
const QString& plotTitle() const;
|
||||
void setPlotTitleEnabled( bool enabled );
|
||||
bool plotTitleEnabled() const;
|
||||
void setPlotTitleEnabled( bool enabled ) override;
|
||||
bool plotTitleEnabled() const override;
|
||||
void setPlotTitleFontSize( int titleFontSize ) override;
|
||||
|
||||
void setLegendFontSize( int fontSize ) override;
|
||||
|
@ -101,8 +101,8 @@ public:
|
||||
|
||||
void setPlotTitle( const QString& plotTitle ) override;
|
||||
const QString& plotTitle() const;
|
||||
void setPlotTitleEnabled( bool enabled );
|
||||
bool plotTitleEnabled() const;
|
||||
void setPlotTitleEnabled( bool enabled ) override;
|
||||
bool plotTitleEnabled() const override;
|
||||
void setPlotTitleFontSize( int titleFontSize ) override;
|
||||
|
||||
void setLegendFontSize( int fontSize ) override;
|
||||
|
Loading…
Reference in New Issue
Block a user