#2843 Fix missing 2d intersection view name updates

This commit is contained in:
Jacob Støren
2018-05-03 09:55:08 +02:00
parent 2f80e99abc
commit 8b6c226f5b
3 changed files with 31 additions and 4 deletions

View File

@@ -116,11 +116,8 @@ void Rim2dIntersectionView::setIntersection(RimIntersection* intersection)
CAF_ASSERT(intersection);
m_intersection = intersection;
Rim3dView * parentView = nullptr;
intersection->firstAncestorOrThisOfTypeAsserted(parentView);
name = parentView->name() + ": " + intersection->name();
this->updateName();
}
//--------------------------------------------------------------------------------------------------
@@ -296,6 +293,19 @@ void Rim2dIntersectionView::update3dInfo()
m_viewer->update();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::updateName()
{
if ( m_intersection )
{
Rim3dView * parentView = nullptr;
m_intersection->firstAncestorOrThisOfTypeAsserted(parentView);
name = parentView->name() + ": " + m_intersection->name();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------