mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-27 08:47:00 -06:00
#2903 Plot Name and Legend Text : Add updateAllTextInPlot
This commit is contained in:
parent
4c1bcf9613
commit
4bd7b1eeb6
@ -422,7 +422,7 @@ void RimEnsembleCurveSet::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
plot->updateAxes();
|
||||
updateTextInPlot = true;
|
||||
}
|
||||
else if (changedField == &m_isUsingAutoName && !m_isUsingAutoName)
|
||||
else if (changedField == &m_isUsingAutoName)
|
||||
{
|
||||
if (!m_isUsingAutoName)
|
||||
{
|
||||
@ -431,6 +431,10 @@ void RimEnsembleCurveSet::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
|
||||
updateTextInPlot = true;
|
||||
}
|
||||
else if (changedField == &m_userDefinedName)
|
||||
{
|
||||
updateTextInPlot = true;
|
||||
}
|
||||
else if (changedField == &m_yPushButtonSelectSummaryAddress)
|
||||
{
|
||||
RiuSummaryCurveDefSelectionDialog dlg(nullptr);
|
||||
@ -464,14 +468,7 @@ void RimEnsembleCurveSet::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
|
||||
if (updateTextInPlot)
|
||||
{
|
||||
updateEnsembleLegendItem();
|
||||
|
||||
RimSummaryPlot* summaryPlot = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(summaryPlot);
|
||||
if (summaryPlot->qwtPlot())
|
||||
{
|
||||
summaryPlot->updatePlotTitle();
|
||||
}
|
||||
updateAllTextInPlot();
|
||||
}
|
||||
}
|
||||
|
||||
@ -883,6 +880,21 @@ void RimEnsembleCurveSet::showCurves(bool show)
|
||||
m_showCurves = show;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEnsembleCurveSet::updateAllTextInPlot()
|
||||
{
|
||||
updateEnsembleLegendItem();
|
||||
|
||||
RimSummaryPlot* summaryPlot = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(summaryPlot);
|
||||
if (summaryPlot->qwtPlot())
|
||||
{
|
||||
summaryPlot->updatePlotTitle();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -93,6 +93,8 @@ public:
|
||||
RimEnsembleCurveSet* clone() const;
|
||||
void showCurves(bool show);
|
||||
|
||||
void updateAllTextInPlot();
|
||||
|
||||
private:
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
caf::PdmFieldHandle* objectToggleField();
|
||||
|
@ -362,6 +362,7 @@ void RimSummaryCurveAutoName::fieldChangedByUi(const caf::PdmFieldHandle* change
|
||||
auto ensembleCurveSet = dynamic_cast<RimEnsembleCurveSet*>(this->parentField()->ownerObject());
|
||||
if (ensembleCurveSet)
|
||||
{
|
||||
ensembleCurveSet->updateAllTextInPlot();
|
||||
ensembleCurveSet->updateConnectedEditors();
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user