#3920 Create Well Path: New well name not used in Completions

This commit is contained in:
Magne Sjaastad 2019-02-07 08:44:12 +01:00
parent f4e0a154ee
commit 189234c0c9
3 changed files with 18 additions and 0 deletions

View File

@ -156,6 +156,17 @@ void RimWellPathCompletions::setWellNameForExport(const QString& name)
m_wellNameForExport = n.remove(' ');
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathCompletions::updateWellPathNameHasChanged(const QString& newWellPathName, const QString& previousWellPathName)
{
if (m_wellNameForExport == previousWellPathName)
{
m_wellNameForExport = newWellPathName;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -59,6 +59,7 @@ public:
std::vector<const RimWellPathComponentInterface*> allCompletions() const;
void setWellNameForExport(const QString& name);
void updateWellPathNameHasChanged(const QString& newWellPathName, const QString& previousWellPathName);
QString wellNameForExport() const;
QString wellGroupNameForExport() const;
QString referenceDepthForExport() const;

View File

@ -347,6 +347,12 @@ void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
{
proj->reloadCompletionTypeResultsInAllViews();
}
else if (changedField == &m_name)
{
QString previousName = oldValue.toString();
QString newName = newValue.toString();
m_completions->updateWellPathNameHasChanged(newName, previousName);
}
else
{
proj->scheduleCreateDisplayModelAndRedrawAllViews();