#2579 2D Intersection View: apply Info Box on/off in main view to 2Dview

This commit is contained in:
Rebecca Cox 2018-03-06 16:05:01 +01:00
parent fab8f2d6a0
commit 3c26640f56
3 changed files with 44 additions and 15 deletions

View File

@ -177,6 +177,15 @@ void Rim2dIntersectionView::update3dInfo()
RimEclipseView * eclView = nullptr; RimEclipseView * eclView = nullptr;
m_intersection->firstAncestorOrThisOfType(eclView); m_intersection->firstAncestorOrThisOfType(eclView);
if (eclView && !eclView->overlayInfoConfig()->isActive())
{
m_viewer->showInfoText(false);
m_viewer->showHistogram(false);
m_viewer->showAnimationProgress(false);
m_viewer->update();
return;
}
if (eclView && eclView->overlayInfoConfig()->showCaseInfo()) if (eclView && eclView->overlayInfoConfig()->showCaseInfo())
{ {
overlayInfoText += "<b>--" + ownerCase()->caseUserDescription() + "--</b>"; overlayInfoText += "<b>--" + ownerCase()->caseUserDescription() + "--</b>";

View File

@ -232,7 +232,7 @@ QImage Rim3dOverlayInfoConfig::statisticsDialogScreenShotImage()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool Rim3dOverlayInfoConfig::showAnimProgress() bool Rim3dOverlayInfoConfig::showAnimProgress() const
{ {
return m_showAnimProgress; return m_showAnimProgress;
} }
@ -240,7 +240,7 @@ bool Rim3dOverlayInfoConfig::showAnimProgress()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool Rim3dOverlayInfoConfig::showCaseInfo() bool Rim3dOverlayInfoConfig::showCaseInfo() const
{ {
return m_showCaseInfo; return m_showCaseInfo;
} }
@ -248,11 +248,19 @@ bool Rim3dOverlayInfoConfig::showCaseInfo()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool Rim3dOverlayInfoConfig::showResultInfo() bool Rim3dOverlayInfoConfig::showResultInfo() const
{ {
return m_showResultInfo; return m_showResultInfo;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool Rim3dOverlayInfoConfig::isActive() const
{
return m_active;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -687,6 +695,7 @@ void Rim3dOverlayInfoConfig::update3DInfo()
m_viewDef->viewer()->showHistogram(false); m_viewDef->viewer()->showHistogram(false);
m_viewDef->viewer()->showAnimationProgress(false); m_viewDef->viewer()->showAnimationProgress(false);
update3DInfoIn2dViews();
return; return;
} }
@ -722,15 +731,7 @@ void Rim3dOverlayInfoConfig::update3DInfo()
m_gridStatisticsDialog->updateFromRimView(geoMechView); m_gridStatisticsDialog->updateFromRimView(geoMechView);
} }
RimCase* rimCase; update3DInfoIn2dViews();
firstAncestorOrThisOfType(rimCase);
if (rimCase)
{
for (Rim2dIntersectionView* view : rimCase->intersectionViewCollection()->views())
{
view->update3dInfo();
}
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -870,6 +871,22 @@ void Rim3dOverlayInfoConfig::updateGeoMech3DInfo(RimGeoMechView * geoMechView)
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dOverlayInfoConfig::update3DInfoIn2dViews() const
{
RimCase* rimCase;
firstAncestorOrThisOfType(rimCase);
if (rimCase)
{
for (Rim2dIntersectionView* view : rimCase->intersectionViewCollection()->views())
{
view->update3dInfo();
}
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -79,9 +79,10 @@ public:
void showStatisticsInfoDialog(bool raise = true); void showStatisticsInfoDialog(bool raise = true);
QImage statisticsDialogScreenShotImage(); QImage statisticsDialogScreenShotImage();
bool showAnimProgress(); bool showAnimProgress() const;
bool showCaseInfo(); bool showCaseInfo() const;
bool showResultInfo(); bool showResultInfo() const;
bool isActive() const;
enum StatisticsTimeRangeType enum StatisticsTimeRangeType
{ {
@ -105,6 +106,8 @@ private:
void updateEclipse3DInfo(RimEclipseView * reservoirView); void updateEclipse3DInfo(RimEclipseView * reservoirView);
void updateGeoMech3DInfo(RimGeoMechView * geoMechView); void updateGeoMech3DInfo(RimGeoMechView * geoMechView);
void update3DInfoIn2dViews() const;
QString timeStepText(RimEclipseView* eclipseView); QString timeStepText(RimEclipseView* eclipseView);
QString timeStepText(RimGeoMechView* geoMechView); QString timeStepText(RimGeoMechView* geoMechView);
HistogramData histogramData(RimEclipseView* eclipseView); HistogramData histogramData(RimEclipseView* eclipseView);