mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
Simplify access to RimMainPlotCollection
* Add current() to RimMainPlotCollection to avoid include of RimProject * Remove "segment" prefix * Reload data when RftCase changes
This commit is contained in:
1 parent
506bfbd638
commit
4cd38d7daf
51 files changed
+240
-418
No files matched your search
@@ -22,19 +22,18 @@
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFlowPlotCollection.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimWellAllocationPlot.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimWellPath.h"
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicShowWellAllocationPlotFeature, "RicShowWellAllocationPlotFeature" );
|
||||
@@ -103,17 +102,14 @@ void RicShowWellAllocationPlotFeature::onActionTriggered( bool isChecked )
|
||||
else
|
||||
return;
|
||||
|
||||
if ( RimProject::current() )
|
||||
RimFlowPlotCollection* flowPlotColl = RimMainPlotCollection::current()->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimFlowPlotCollection* flowPlotColl = RimProject::current()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
flowPlotColl->defaultWellAllocPlot()->setFromSimulationWell( simWell );
|
||||
flowPlotColl->defaultWellAllocPlot()->updateConnectedEditors();
|
||||
flowPlotColl->defaultWellAllocPlot()->setFromSimulationWell( simWell );
|
||||
flowPlotColl->defaultWellAllocPlot()->updateConnectedEditors();
|
||||
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::onObjectAppended( flowPlotColl->defaultWellAllocPlot() );
|
||||
}
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::onObjectAppended( flowPlotColl->defaultWellAllocPlot() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user