mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2580 Export Completion Data : Add command in File/Export menu
This commit is contained in:
@@ -18,9 +18,12 @@
|
||||
|
||||
#include "RicExportCompletionsForVisibleWellPathsFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RicWellPathExportCompletionDataFeature.h"
|
||||
|
||||
#include "RimWellPath.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
@@ -93,16 +96,33 @@ std::vector<RimWellPath*> RicExportCompletionsForVisibleWellPathsFeature::visibl
|
||||
}
|
||||
}
|
||||
|
||||
for (auto wellPathCollection : wellPathCollections)
|
||||
if (!wellPathCollections.empty())
|
||||
{
|
||||
for (auto wellPath : wellPathCollection->wellPaths())
|
||||
for (auto wellPathCollection : wellPathCollections)
|
||||
{
|
||||
if (wellPath->showWellPath())
|
||||
for (const auto& wellPath : wellPathCollection->wellPaths())
|
||||
{
|
||||
wellPaths.push_back(wellPath);
|
||||
if (wellPath->showWellPath())
|
||||
{
|
||||
wellPaths.push_back(wellPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// No well path or well path collection selected
|
||||
|
||||
auto allWellPaths = RiaApplication::instance()->project()->allWellPaths();
|
||||
for (const auto& w : allWellPaths)
|
||||
{
|
||||
if (w->showWellPath())
|
||||
{
|
||||
wellPaths.push_back(w);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
std::set<RimWellPath*> uniqueWellPaths(wellPaths.begin(), wellPaths.end());
|
||||
|
||||
@@ -398,6 +398,7 @@ void RiuMainWindow::createMenus()
|
||||
exportMenu->addAction(cmdFeatureMgr->action("RicExportMultipleSnapshotsFeature"));
|
||||
exportMenu->addSeparator();
|
||||
exportMenu->addAction(cmdFeatureMgr->action("RicSaveEclipseInputActiveVisibleCellsFeature"));
|
||||
exportMenu->addAction(cmdFeatureMgr->action("RicExportCompletionsForVisibleWellPathsFeature"));
|
||||
|
||||
fileMenu->addSeparator();
|
||||
fileMenu->addAction(cmdFeatureMgr->action("RicSaveProjectFeature"));
|
||||
@@ -753,6 +754,10 @@ void RiuMainWindow::slotRefreshFileActions()
|
||||
CVF_ASSERT(cmdFeatureMgr);
|
||||
|
||||
cmdFeatureMgr->action("RicWellPathsImportSsihubFeature")->setEnabled(projectFileExists);
|
||||
|
||||
QStringList commandIdList;
|
||||
commandIdList << "RicExportCompletionsForVisibleWellPathsFeature";
|
||||
cmdFeatureMgr->refreshStates(commandIdList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user