Skip to content

Commit

Permalink
Hide grid mesh lines in contour map view
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjenssen committed Dec 3, 2024
1 parent eee6f36 commit 2429d4d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMapFr
contourMap->faultCollection()->setActive( false );
contourMap->wellCollection()->isActive = false;

contourMap->setCompatibleDrawStyle();

// Set default values
RimRegularLegendConfig* legendConfig = contourMap->cellResult()->legendConfig();
if ( legendConfig && legendConfig->mappingMode() == RimRegularLegendConfig::MappingType::CATEGORY_INTEGER )
Expand Down Expand Up @@ -394,6 +396,7 @@ RimGeoMechContourMapView* RicNewContourMapViewFeature::createGeoMechContourMapFr
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background

contourMap->setDefaultCustomName();
contourMap->setCompatibleDrawStyle();

caf::PdmDocument::updateUiIconStateRecursively( contourMap );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ bool RimGeoMechContourMapView::isTimeStepDependentDataVisible() const
return true;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGeoMechContourMapView::setCompatibleDrawStyle()
{
surfaceMode = FAULTS;
meshMode = RiaDefines::MeshModeType::NO_MESH;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand All @@ -181,8 +190,7 @@ void RimGeoMechContourMapView::initAfterRead()
m_gridCollection->setActive( false ); // This is also not added to the tree view, so cannot be enabled.
disablePerspectiveProjectionField();
setShowGridBox( false );
meshMode.setValue( RiaDefines::MeshModeType::NO_MESH );
surfaceMode.setValue( FAULTS );
setCompatibleDrawStyle();
scheduleCreateDisplayModelAndRedraw();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class RimGeoMechContourMapView : public RimGeoMechView

bool isTimeStepDependentDataVisible() const override;

void setCompatibleDrawStyle();

protected:
void initAfterRead() override;
void onCreateDisplayModel() override;
Expand Down
11 changes: 10 additions & 1 deletion ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ void RimEclipseContourMapView::updatePickPointAndRedraw()
}
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipseContourMapView::setCompatibleDrawStyle()
{
surfaceMode = FAULTS;
meshMode = RiaDefines::MeshModeType::NO_MESH;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand All @@ -175,8 +184,8 @@ void RimEclipseContourMapView::initAfterRead()

disablePerspectiveProjectionField();
setShowGridBox( false );
surfaceMode.setValue( FAULTS );
setFaultVisParameters();
setCompatibleDrawStyle();
scheduleCreateDisplayModelAndRedraw();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class RimEclipseContourMapView : public RimEclipseView
RimSurfaceInViewCollection* surfaceInViewCollection() const override;
void zoomAll() override;

void setCompatibleDrawStyle();

protected:
void initAfterRead() override;
void onCreateDisplayModel() override;
Expand Down

0 comments on commit 2429d4d

Please sign in to comment.