From 9fa772a7bc059fefff27e2e2af6a87bf2c447827 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 10 Feb 2017 12:31:35 +0100 Subject: [PATCH] Fixed #1177 Well Alloc plots: Store command does not add an actual window --- .../RicAddStoredWellAllocationPlotFeature.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp index 719164cecd..76c74525c0 100644 --- a/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp +++ b/ApplicationCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp @@ -67,12 +67,14 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered(bool isChecked) { RimWellAllocationPlot* sourceObject = dynamic_cast(caf::SelectionManager::instance()->selectedItem()); - RimWellAllocationPlot* newObject = dynamic_cast(sourceObject->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); - CVF_ASSERT(newObject); + RimWellAllocationPlot* wellAllocationPlot = dynamic_cast(sourceObject->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance())); + CVF_ASSERT(wellAllocationPlot); - flowPlotColl->flowPlots.push_back(newObject); - newObject->resolveReferencesRecursively(); + flowPlotColl->flowPlots.push_back(wellAllocationPlot); + wellAllocationPlot->resolveReferencesRecursively(); + wellAllocationPlot->loadDataAndUpdate(); + flowPlotColl->updateConnectedEditors(); } }