mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3624 Guard use of m_viewer in Rim2dEclipseView
This commit is contained in:
parent
8545fe5d7f
commit
ccea48bc25
@ -137,10 +137,10 @@ void Rim2dEclipseView::updateCurrentTimeStep()
|
|||||||
|
|
||||||
RimEclipseView::updateCurrentTimeStep();
|
RimEclipseView::updateCurrentTimeStep();
|
||||||
|
|
||||||
cvf::Scene* frameScene = m_viewer->frame(m_currentTimeStep);
|
if (m_viewer && m_2dGridProjection->isChecked())
|
||||||
|
|
||||||
if (m_2dGridProjection->isChecked())
|
|
||||||
{
|
{
|
||||||
|
cvf::Scene* frameScene = m_viewer->frame(m_currentTimeStep);
|
||||||
|
|
||||||
cvf::String name = "Grid2dProjection";
|
cvf::String name = "Grid2dProjection";
|
||||||
this->removeModelByName(frameScene, name);
|
this->removeModelByName(frameScene, name);
|
||||||
|
|
||||||
@ -163,17 +163,17 @@ void Rim2dEclipseView::updateLegends()
|
|||||||
if (m_viewer)
|
if (m_viewer)
|
||||||
{
|
{
|
||||||
m_viewer->removeAllColorLegends();
|
m_viewer->removeAllColorLegends();
|
||||||
}
|
|
||||||
|
|
||||||
if (m_2dGridProjection && m_2dGridProjection->isChecked())
|
if (m_2dGridProjection && m_2dGridProjection->isChecked())
|
||||||
{
|
|
||||||
RimRegularLegendConfig* projectionLegend = m_2dGridProjection->legendConfig();
|
|
||||||
if (projectionLegend)
|
|
||||||
{
|
{
|
||||||
m_2dGridProjection->updateLegend();
|
RimRegularLegendConfig* projectionLegend = m_2dGridProjection->legendConfig();
|
||||||
if (projectionLegend->showLegend())
|
if (projectionLegend)
|
||||||
{
|
{
|
||||||
m_viewer->addColorLegendToBottomLeftCorner(projectionLegend->titledOverlayFrame());
|
m_2dGridProjection->updateLegend();
|
||||||
|
if (projectionLegend->showLegend())
|
||||||
|
{
|
||||||
|
m_viewer->addColorLegendToBottomLeftCorner(projectionLegend->titledOverlayFrame());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,9 +184,12 @@ void Rim2dEclipseView::updateLegends()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim2dEclipseView::updateViewWidgetAfterCreation()
|
void Rim2dEclipseView::updateViewWidgetAfterCreation()
|
||||||
{
|
{
|
||||||
m_viewer->showAxisCross(false);
|
if (m_viewer)
|
||||||
m_viewer->showEdgeTickMarksXY(true, m_showAxisLines());
|
{
|
||||||
m_viewer->enableNavigationRotation(false);
|
m_viewer->showAxisCross(false);
|
||||||
|
m_viewer->showEdgeTickMarksXY(true, m_showAxisLines());
|
||||||
|
m_viewer->enableNavigationRotation(false);
|
||||||
|
}
|
||||||
|
|
||||||
Rim3dView::updateViewWidgetAfterCreation();
|
Rim3dView::updateViewWidgetAfterCreation();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user