mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
3D Well Log Curves: Command to Delete curve #2667
* Add delete command with explicit delete feature class.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "Rim3dWellLogCurveCollection.h"
|
||||
|
||||
#include "Rim3dWellLogCurve.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(Rim3dWellLogCurveCollection, "Rim3dWellLogCurveCollection");
|
||||
@@ -79,6 +80,14 @@ void Rim3dWellLogCurveCollection::add3dWellLogCurve(Rim3dWellLogCurve* curve)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogCurveCollection::remove3dWellLogCurve(Rim3dWellLogCurve* curve)
|
||||
{
|
||||
m_3dWellLogCurves.removeChildObject(curve);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -117,6 +126,25 @@ std::vector<Rim3dWellLogCurve*> Rim3dWellLogCurveCollection::vectorOf3dWellLogCu
|
||||
return curves;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogCurveCollection::redrawAffectedViewsAndEditors()
|
||||
{
|
||||
RimProject* proj = nullptr;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
RimWellPath* path = nullptr;
|
||||
this->firstAncestorOrThisOfType(path);
|
||||
if (path)
|
||||
{
|
||||
path->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
|
||||
bool has3dWellLogCurves() const;
|
||||
void add3dWellLogCurve(Rim3dWellLogCurve* curve);
|
||||
void remove3dWellLogCurve(Rim3dWellLogCurve* curve);
|
||||
|
||||
bool isShowingGrid() const;
|
||||
bool isShowingPlot() const;
|
||||
@@ -53,7 +54,7 @@ public:
|
||||
PlanePosition planePosition() const;
|
||||
|
||||
std::vector<Rim3dWellLogCurve*> vectorOf3dWellLogCurves() const;
|
||||
|
||||
void redrawAffectedViewsAndEditors();
|
||||
private:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
@@ -760,18 +760,22 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
menuBuilder << "RicDeleteSubItemsFeature";
|
||||
}
|
||||
|
||||
// Special delete commands for specific features
|
||||
// Placed here to fit context menu location of general delete feature
|
||||
if (caf::CmdFeatureManager::instance()->getCommandFeature("RicWellPathDeleteFeature")->canFeatureBeExecuted())
|
||||
{
|
||||
// Special delete command for Well paths
|
||||
// Placed here to fit context menu location of general delete feature
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicWellPathDeleteFeature";
|
||||
}
|
||||
|
||||
if (caf::CmdFeatureManager::instance()->getCommandFeature("Ric3dWellLogCurveDeleteFeature")->canFeatureBeExecuted())
|
||||
{
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "Ric3dWellLogCurveDeleteFeature";
|
||||
}
|
||||
|
||||
if (caf::CmdFeatureManager::instance()->getCommandFeature("RicWellLogFileCloseFeature")->canFeatureBeExecuted())
|
||||
{
|
||||
// Special delete command for Well paths
|
||||
// Placed here to fit context menu location of general delete feature
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicWellLogFileCloseFeature";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user