diff --git a/ApplicationCode/Application/RiaApplication.cpp b/ApplicationCode/Application/RiaApplication.cpp index 234f1b9b92..69f974e6bc 100644 --- a/ApplicationCode/Application/RiaApplication.cpp +++ b/ApplicationCode/Application/RiaApplication.cpp @@ -70,6 +70,7 @@ #include "RimWellLogPlot.h" #include "RimWellLogPlotCollection.h" #include "RimWellPath.h" +#include "RimFlowPlotCollection.h" #include "RimWellPathCollection.h" #include "RiuMainPlotWindow.h" @@ -80,6 +81,7 @@ #include "RiuSummaryQwtPlot.h" #include "RiuViewer.h" #include "RiuWellLogPlot.h" +#include "RiuWellAllocationPlot.h" #include "RicImportSummaryCaseFeature.h" #include "RicSnapshotViewToClipboardFeature.h" @@ -114,7 +116,6 @@ #ifdef WIN32 #include #endif -#include "RimFlowPlotCollection.h" namespace caf { @@ -1632,6 +1633,12 @@ RimViewWindow* RiaApplication::activeViewWindow() { viewWindow = wellLogPlot->ownerPlotDefinition(); } + + RiuWellAllocationPlot* wellAllocationPlot = dynamic_cast(subwindows.back()->widget()); + if (wellAllocationPlot) + { + viewWindow = wellAllocationPlot->ownerPlotDefinition(); + } } } diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp index ce815960bf..83da707b9a 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp @@ -599,7 +599,11 @@ QImage RimWellAllocationPlot::snapshotWindowContent() { QImage image; - // TODO + if (m_wellAllocationPlotWidget) + { + QPixmap pix = QPixmap::grabWidget(m_wellAllocationPlotWidget); + image = pix.toImage(); + } return image; }