mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2045 Curve Creator : Clear last curve selection when creating a new plot
This commit is contained in:
parent
0be241eb59
commit
1fb6d87c82
@ -125,7 +125,7 @@ RimSummaryPlot* RicSummaryCurveCreator::previewPlot() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSummaryCurveCreator::updateFromSummaryPlot(RimSummaryPlot* targetPlot)
|
||||
{
|
||||
if (m_targetPlot != targetPlot)
|
||||
if (targetPlot == nullptr || m_targetPlot != targetPlot)
|
||||
{
|
||||
resetAllFields();
|
||||
}
|
||||
@ -136,9 +136,10 @@ void RicSummaryCurveCreator::updateFromSummaryPlot(RimSummaryPlot* targetPlot)
|
||||
if (m_targetPlot)
|
||||
{
|
||||
populateCurveCreator(*m_targetPlot);
|
||||
syncPreviewCurvesFromUiSelection();
|
||||
}
|
||||
|
||||
syncPreviewCurvesFromUiSelection();
|
||||
|
||||
caf::PdmUiItem::updateConnectedEditors();
|
||||
}
|
||||
|
||||
@ -548,6 +549,9 @@ void RicSummaryCurveCreator::copyCurveAndAddToPlot(const RimSummaryCurve *curve,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSummaryCurveCreator::resetAllFields()
|
||||
{
|
||||
std::vector<RiaSummaryCurveDefinition> curveDefinitions;
|
||||
m_summaryCurveSelectionEditor->summaryAddressSelection()->setSelectedCurveDefinitions(curveDefinitions);
|
||||
|
||||
m_previewPlot->deleteAllSummaryCurves();
|
||||
m_targetPlot = nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user