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:
@@ -125,7 +125,7 @@ RimSummaryPlot* RicSummaryCurveCreator::previewPlot() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicSummaryCurveCreator::updateFromSummaryPlot(RimSummaryPlot* targetPlot)
|
void RicSummaryCurveCreator::updateFromSummaryPlot(RimSummaryPlot* targetPlot)
|
||||||
{
|
{
|
||||||
if (m_targetPlot != targetPlot)
|
if (targetPlot == nullptr || m_targetPlot != targetPlot)
|
||||||
{
|
{
|
||||||
resetAllFields();
|
resetAllFields();
|
||||||
}
|
}
|
||||||
@@ -136,9 +136,10 @@ void RicSummaryCurveCreator::updateFromSummaryPlot(RimSummaryPlot* targetPlot)
|
|||||||
if (m_targetPlot)
|
if (m_targetPlot)
|
||||||
{
|
{
|
||||||
populateCurveCreator(*m_targetPlot);
|
populateCurveCreator(*m_targetPlot);
|
||||||
syncPreviewCurvesFromUiSelection();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
syncPreviewCurvesFromUiSelection();
|
||||||
|
|
||||||
caf::PdmUiItem::updateConnectedEditors();
|
caf::PdmUiItem::updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,6 +549,9 @@ void RicSummaryCurveCreator::copyCurveAndAddToPlot(const RimSummaryCurve *curve,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicSummaryCurveCreator::resetAllFields()
|
void RicSummaryCurveCreator::resetAllFields()
|
||||||
{
|
{
|
||||||
|
std::vector<RiaSummaryCurveDefinition> curveDefinitions;
|
||||||
|
m_summaryCurveSelectionEditor->summaryAddressSelection()->setSelectedCurveDefinitions(curveDefinitions);
|
||||||
|
|
||||||
m_previewPlot->deleteAllSummaryCurves();
|
m_previewPlot->deleteAllSummaryCurves();
|
||||||
m_targetPlot = nullptr;
|
m_targetPlot = nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user