#2609 Add names to new wells, and make it editable and saved/read

This commit is contained in:
Jacob Støren 2018-07-04 17:01:40 +02:00
parent 7156b99b88
commit 972d006249
3 changed files with 6 additions and 2 deletions

View File

@ -68,6 +68,7 @@ void RicNewEditableWellPathFeature::onActionTriggered(bool isChecked)
{
std::vector<RimWellPath*> newWellPaths;
newWellPaths.push_back(new RimModeledWellPath());
newWellPaths.back()->setName("UWell-" + QString::number(wellPathCollection->wellPaths.size()));
wellPathCollection->addWellPaths(newWellPaths);
wellPathCollection->uiCapability()->updateConnectedEditors();
wellPathCollection->scheduleRedrawAffectedViews();

View File

@ -38,6 +38,10 @@ RimModeledWellPath::RimModeledWellPath()
CAF_PDM_InitFieldNoDefault(&m_geometryDefinition, "WellPathGeometryDef", "Trajectory", "", "", "");
//m_geometryDefinition.uiCapability()->setUiHidden(true);
m_geometryDefinition = new RimWellPathGeometryDef;
m_name.uiCapability()->setUiReadOnly(false);
m_name.xmlCapability()->setIOWritable(true);
m_name.xmlCapability()->setIOReadable(true);
}
//--------------------------------------------------------------------------------------------------

View File

@ -135,10 +135,9 @@ protected:
// Fields
protected:
caf::PdmField<double> m_datumElevation;
private:
caf::PdmField<QString> m_name;
private:
caf::PdmField<QString> m_simWellName;
caf::PdmField<int> m_branchIndex;