#2413 2D Intersection View: Add geoMech result title to infoText

This commit is contained in:
Rebecca Cox 2018-02-13 14:01:37 +01:00
parent 4eb80e83bb
commit 3b627ce1c4
3 changed files with 17 additions and 1 deletions

View File

@ -387,7 +387,7 @@ void Rim2dIntersectionView::updateLegends()
m_intersection->firstAncestorOrThisOfType(geoView);
if (geoView)
{
overlayInfoText += "<b>Cell Result:</b> " + geoView->cellResult()->legendConfig()->resultVariableName() + "<br>";
overlayInfoText += "<b>Cell Result:</b> " + geoView->cellResult()->legendConfig()->title() + "<br>";
m_legendConfig()->setUiValuesFromLegendConfig(geoView->cellResult()->legendConfig());

View File

@ -674,6 +674,21 @@ void RimLegendConfig::setTitle(const QString& title)
m_categoryLegend->setTitle(cvfTitle);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimLegendConfig::title() const
{
if (m_currentScalarMapper == m_categoryMapper)
{
return cvfqt::Utils::toQString(m_categoryLegend->title());
}
else
{
return cvfqt::Utils::toQString(m_scalarMapperLegend->title());
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -115,6 +115,7 @@ public:
QString categoryNameFromCategoryValue(double categoryResultValue) const;
void setTitle(const QString& title);
QString title() const;
void setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig);