mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
Replace RimTools::wellPathCollection() with RimWellPathCollection::instance()
Remove the redundant wrapper function and update all call sites to use RimWellPathCollection::instance() directly. Remove unused #include "RimTools.h" from files using RimWellPathCollection::instance() directly
This commit is contained in:
1 parent
211ae24241
commit
83f667cdf8
43 files changed
+60
-120
No files matched your search
@@ -25,7 +25,6 @@ CAF_CMD_SOURCE_INIT( RicPasteModeledWellPathFeature, "RicPasteModeledWellPathFea
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
#include "RimWellPathTieIn.h"
|
||||
@@ -65,8 +64,7 @@ void RicPasteModeledWellPathFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
if ( proj && proj->activeOilField() )
|
||||
{
|
||||
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
|
||||
if ( wellPathCollection )
|
||||
if ( auto wellPathCollection = RimWellPathCollection::instance() )
|
||||
{
|
||||
RimModeledWellPath* wellPathToSelect = nullptr;
|
||||
for ( auto sourceWellPath : modeledWellPathsFromClipboard() )
|
||||
@@ -76,7 +74,7 @@ void RicPasteModeledWellPathFeature::onActionTriggered( bool isChecked )
|
||||
wellPathToSelect = destinationWellPath;
|
||||
}
|
||||
|
||||
RimTools::wellPathCollection()->rebuildWellPathNodes();
|
||||
RimWellPathCollection::instance()->rebuildWellPathNodes();
|
||||
|
||||
wellPathCollection->uiCapability()->updateConnectedEditors();
|
||||
|
||||
@@ -121,7 +119,7 @@ std::vector<RimModeledWellPath*> RicPasteModeledWellPathFeature::modeledWellPath
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicPasteModeledWellPathFeature::duplicateLaterals( const RimModeledWellPath* source, RimModeledWellPath* destination )
|
||||
{
|
||||
auto wpc = RimTools::wellPathCollection();
|
||||
auto wpc = RimWellPathCollection::instance();
|
||||
|
||||
auto sourceLaterals = wpc->connectedWellPathLaterals( source );
|
||||
|
||||
@@ -144,7 +142,7 @@ RimModeledWellPath* RicPasteModeledWellPathFeature::duplicateAndInitializeWellPa
|
||||
{
|
||||
if ( !sourceWellPath ) return nullptr;
|
||||
|
||||
auto wpc = RimTools::wellPathCollection();
|
||||
auto wpc = RimWellPathCollection::instance();
|
||||
|
||||
auto* destinationWellPath = sourceWellPath->copyObject<RimModeledWellPath>();
|
||||
QString name = sourceWellPath->name() + "(copy)";
|
||||
|
||||
Reference in new issue
Block a user