mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2413 2D Intersection View: Add Text info
This commit is contained in:
@@ -29,12 +29,16 @@
|
||||
#include "cvfModelBasicList.h"
|
||||
#include "cvfTransform.h"
|
||||
#include "cvfScene.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimGeoMechCellColors.h"
|
||||
#include "RimLegendConfig.h"
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
@@ -336,12 +340,32 @@ void Rim2dIntersectionView::updateLegends()
|
||||
|
||||
if (!hasResults()) return;
|
||||
|
||||
RimCase* rimCase = nullptr;
|
||||
m_intersection->firstAncestorOrThisOfType(rimCase);
|
||||
|
||||
QString overlayInfoText;
|
||||
|
||||
overlayInfoText += "<b>Case:</b> " + ownerCase()->caseUserDescription() + "<br>";
|
||||
|
||||
overlayInfoText += "<b>Intersection:</b> " + m_intersection->name() + "<br>";
|
||||
|
||||
if (m_intersection->simulationWell())
|
||||
{
|
||||
overlayInfoText += "<b>Simulation Well:</b> " + m_intersection->simulationWell()->name() + "<br>";;
|
||||
}
|
||||
else if (m_intersection->wellPath())
|
||||
{
|
||||
overlayInfoText += "<b>Well Path:</b> " + m_intersection->wellPath()->name() + "<br>";;
|
||||
}
|
||||
|
||||
cvf::OverlayItem* legend = nullptr;
|
||||
|
||||
RimEclipseView * eclView = nullptr;
|
||||
m_intersection->firstAncestorOrThisOfType(eclView);
|
||||
if (eclView)
|
||||
{
|
||||
overlayInfoText += "<b>Cell Result:</b> " + eclView->cellResult()->resultVariableUiShortName() + "</br>";
|
||||
|
||||
m_legendConfig()->setUiValuesFromLegendConfig(eclView->cellResult()->legendConfig());
|
||||
m_ternaryLegendConfig()->setUiValuesFromLegendConfig(eclView->cellResult()->ternaryLegendConfig());
|
||||
eclView->cellResult()->updateLegendData(m_currentTimeStep(), m_legendConfig(), m_ternaryLegendConfig());
|
||||
@@ -362,6 +386,8 @@ void Rim2dIntersectionView::updateLegends()
|
||||
m_intersection->firstAncestorOrThisOfType(geoView);
|
||||
if (geoView)
|
||||
{
|
||||
overlayInfoText += "<b>Cell Result:</b> " + geoView->cellResult()->legendConfig()->resultVariableName() + "</br>";
|
||||
|
||||
m_legendConfig()->setUiValuesFromLegendConfig(geoView->cellResult()->legendConfig());
|
||||
|
||||
geoView->updateLegendTextAndRanges(m_legendConfig(), m_currentTimeStep());
|
||||
@@ -372,6 +398,9 @@ void Rim2dIntersectionView::updateLegends()
|
||||
{
|
||||
m_viewer->addColorLegendToBottomLeftCorner(legend);
|
||||
}
|
||||
|
||||
m_viewer->setInfoText(overlayInfoText);
|
||||
m_viewer->showInfoText(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user