mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#428) Selecting well log plot in tree view when its viewer is activated
This commit is contained in:
@@ -52,6 +52,8 @@
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathImport.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
|
||||
#include "RiuMultiCaseImportDialog.h"
|
||||
#include "RiuProcessMonitor.h"
|
||||
@@ -1354,6 +1356,22 @@ void RiuMainWindow::slotSubWindowActivated(QMdiSubWindow* subWindow)
|
||||
if (!proj) return;
|
||||
if (!subWindow) return;
|
||||
|
||||
RiuWellLogPlot* wellLogPlotViewer = dynamic_cast<RiuWellLogPlot*>(subWindow->widget());
|
||||
if (wellLogPlotViewer)
|
||||
{
|
||||
RimMainPlotCollection* mainPlotColl = proj->mainPlotCollection();
|
||||
RimWellLogPlotCollection* wellPlotColl = mainPlotColl ? mainPlotColl->wellLogPlotCollection() : NULL;
|
||||
if (wellPlotColl)
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot = wellPlotColl->wellLogPlotFromViewer(wellLogPlotViewer);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
projectTreeView()->selectAsCurrentItem(wellLogPlot);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Iterate all cases in each oil field
|
||||
std::vector<RimCase*> allCases;
|
||||
proj->allCases(allCases);
|
||||
|
||||
Reference in New Issue
Block a user