mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3205 Improved default name of modelled wellpaths. Made sure that the name is read and written.
This commit is contained in:
parent
319203b7fc
commit
a6d91873e6
@ -68,7 +68,7 @@ void RicNewEditableWellPathFeature::onActionTriggered(bool isChecked)
|
|||||||
{
|
{
|
||||||
std::vector<RimWellPath*> newWellPaths;
|
std::vector<RimWellPath*> newWellPaths;
|
||||||
newWellPaths.push_back(new RimModeledWellPath());
|
newWellPaths.push_back(new RimModeledWellPath());
|
||||||
newWellPaths.back()->setName("UWell-" + QString::number(wellPathCollection->wellPaths.size()));
|
newWellPaths.back()->setName("UWell-" + QString::number(wellPathCollection->modelledWellPathCount()+1));
|
||||||
wellPathCollection->addWellPaths(newWellPaths);
|
wellPathCollection->addWellPaths(newWellPaths);
|
||||||
wellPathCollection->uiCapability()->updateConnectedEditors();
|
wellPathCollection->uiCapability()->updateConnectedEditors();
|
||||||
wellPathCollection->scheduleRedrawAffectedViews();
|
wellPathCollection->scheduleRedrawAffectedViews();
|
||||||
|
@ -36,7 +36,6 @@ RimModeledWellPath::RimModeledWellPath()
|
|||||||
CAF_PDM_InitObject("Modeled WellPath", ":/Well.png", "", "");
|
CAF_PDM_InitObject("Modeled WellPath", ":/Well.png", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_geometryDefinition, "WellPathGeometryDef", "Trajectory", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_geometryDefinition, "WellPathGeometryDef", "Trajectory", "", "", "");
|
||||||
//m_geometryDefinition.uiCapability()->setUiHidden(true);
|
|
||||||
m_geometryDefinition = new RimWellPathGeometryDef;
|
m_geometryDefinition = new RimWellPathGeometryDef;
|
||||||
|
|
||||||
m_name.uiCapability()->setUiReadOnly(false);
|
m_name.uiCapability()->setUiReadOnly(false);
|
||||||
|
@ -448,6 +448,22 @@ bool RimWellPathCollection::anyWellsContainingPerforationIntervals() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
size_t RimWellPathCollection::modelledWellPathCount() const
|
||||||
|
{
|
||||||
|
size_t count = 0;
|
||||||
|
for (size_t wellPathIdx = 0; wellPathIdx < wellPaths.size(); wellPathIdx++)
|
||||||
|
{
|
||||||
|
if (dynamic_cast<RimModeledWellPath*>( wellPaths[wellPathIdx]))
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -109,7 +109,7 @@ public:
|
|||||||
|
|
||||||
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
||||||
bool anyWellsContainingPerforationIntervals() const;
|
bool anyWellsContainingPerforationIntervals() const;
|
||||||
|
size_t modelledWellPathCount() const;
|
||||||
protected:
|
protected:
|
||||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user