From d90dd91e291e09ecb17b439ea22cf6b4ccebaf33 Mon Sep 17 00:00:00 2001 From: Jon Jenssen Date: Tue, 3 Dec 2024 14:42:02 +0100 Subject: [PATCH] Hide grid mesh lines in contour map view --- .../Commands/RicNewContourMapViewFeature.cpp | 3 +++ .../GeoMech/RimGeoMechContourMapView.cpp | 12 ++++++++++-- .../GeoMech/RimGeoMechContourMapView.h | 2 ++ .../ProjectDataModel/RimEclipseContourMapView.cpp | 11 ++++++++++- .../ProjectDataModel/RimEclipseContourMapView.h | 2 ++ 5 files changed, 27 insertions(+), 3 deletions(-) diff --git a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp index 7d71506328..ce5ce19330 100644 --- a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp @@ -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 ) @@ -394,6 +396,7 @@ RimGeoMechContourMapView* RicNewContourMapViewFeature::createGeoMechContourMapFr contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background contourMap->setDefaultCustomName(); + contourMap->setCompatibleDrawStyle(); caf::PdmDocument::updateUiIconStateRecursively( contourMap ); diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.cpp b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.cpp index dc550251c6..0d3efc8225 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.cpp +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.cpp @@ -171,6 +171,15 @@ bool RimGeoMechContourMapView::isTimeStepDependentDataVisible() const return true; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimGeoMechContourMapView::setCompatibleDrawStyle() +{ + surfaceMode = FAULTS; + meshMode = RiaDefines::MeshModeType::NO_MESH; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -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(); } diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.h b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.h index d763a99b03..38f126b8bc 100644 --- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.h +++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechContourMapView.h @@ -45,6 +45,8 @@ public: bool isTimeStepDependentDataVisible() const override; + void setCompatibleDrawStyle(); + protected: void initAfterRead() override; void onCreateDisplayModel() override; diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.cpp index 5604bb9602..e1dfa286ae 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.cpp @@ -166,6 +166,15 @@ void RimEclipseContourMapView::updatePickPointAndRedraw() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimEclipseContourMapView::setCompatibleDrawStyle() +{ + surfaceMode = FAULTS; + meshMode = RiaDefines::MeshModeType::NO_MESH; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -175,8 +184,8 @@ void RimEclipseContourMapView::initAfterRead() disablePerspectiveProjectionField(); setShowGridBox( false ); - surfaceMode.setValue( FAULTS ); setFaultVisParameters(); + setCompatibleDrawStyle(); scheduleCreateDisplayModelAndRedraw(); } diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.h b/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.h index 29b15be988..80ee753c13 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.h +++ b/ApplicationLibCode/ProjectDataModel/RimEclipseContourMapView.h @@ -46,6 +46,8 @@ public: RimSurfaceInViewCollection* surfaceInViewCollection() const override; void zoomAll() override; + void setCompatibleDrawStyle(); + protected: void initAfterRead() override; void onCreateDisplayModel() override;