diff --git a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp index 55b1076e8d..e7b0af4425 100644 --- a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp @@ -463,7 +463,7 @@ size_t RivWellPathPartMgr::segmentIndexFromTriangleIndex(size_t triangleIndex) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RivWellPathPartMgr::updateWellNameTextColor(cvf::Color3f color) +void RivWellPathPartMgr::updateWellLabelTextColor(cvf::Color3f color) { if (m_wellLabelPart.p()) { diff --git a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.h b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.h index a8a9e1cc21..1b1cda1c2e 100644 --- a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.h +++ b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.h @@ -72,7 +72,7 @@ public: size_t segmentIndexFromTriangleIndex(size_t triangleIndex); - void updateWellNameTextColor(cvf::Color3f color); + void updateWellLabelTextColor(cvf::Color3f color); private: void appendFishboneSubsPartsToModel(cvf::ModelBasicList* model, diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp index c23aeaee67..85253978c7 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp @@ -715,6 +715,7 @@ void RimEclipseCase::reloadDataAndUpdate() CVF_ASSERT(reservoirView); reservoirView->loadDataAndUpdate(); reservoirView->updateGridBoxData(); + reservoirView->updateAnnotationItems(); } RimProject* project = RiaApplication::instance()->project(); diff --git a/ApplicationCode/ProjectDataModel/RimView.cpp b/ApplicationCode/ProjectDataModel/RimView.cpp index 4557c62bfe..019a63af2d 100644 --- a/ApplicationCode/ProjectDataModel/RimView.cpp +++ b/ApplicationCode/ProjectDataModel/RimView.cpp @@ -241,6 +241,7 @@ void RimView::updateViewWidgetAfterCreation() m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor())); this->updateGridBoxData(); + this->updateAnnotationItems(); this->createHighlightAndGridBoxDisplayModel(); m_viewer->update(); @@ -700,6 +701,7 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor())); } updateGridBoxData(); + updateAnnotationItems(); } else if (changedField == &maximumFrameRate) { @@ -957,6 +959,17 @@ void RimView::updateGridBoxData() } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimView::updateAnnotationItems() +{ + if (m_viewer) + { + m_viewer->updateAnnotationItems(); + } +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimView.h b/ApplicationCode/ProjectDataModel/RimView.h index d0b6f04a90..2c18688e75 100644 --- a/ApplicationCode/ProjectDataModel/RimView.h +++ b/ApplicationCode/ProjectDataModel/RimView.h @@ -171,6 +171,7 @@ public: public: void updateGridBoxData(); + void updateAnnotationItems(); virtual RimCase* ownerCase() const = 0; virtual caf::PdmFieldHandle* userDescriptionField() override { return &name; } diff --git a/ApplicationCode/UserInterface/RiuViewer.cpp b/ApplicationCode/UserInterface/RiuViewer.cpp index 63c2568e50..79051e5d30 100644 --- a/ApplicationCode/UserInterface/RiuViewer.cpp +++ b/ApplicationCode/UserInterface/RiuViewer.cpp @@ -62,6 +62,8 @@ #include "RimWellPathCollection.h" #include "RimWellPath.h" #include "RivWellPathPartMgr.h" +#include "RimSimWellInViewCollection.h" +#include "RimEclipseView.h" using cvf::ManipulatorTrackball; @@ -766,13 +768,19 @@ void RiuViewer::updateGridBoxData() } m_gridBoxGenerator->createGridBoxParts(); - - updateTextAndTickMarkColorForOverlayItems(); - - updateWellPathTextColor(); } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiuViewer::updateAnnotationItems() +{ + updateTextAndTickMarkColorForOverlayItems(); + + updateWellPathTextColor(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -789,15 +797,14 @@ void RiuViewer::updateWellPathTextColor() RimView* rimView = ownerReservoirView(); if (!rimView) return; - RimWellPathCollection* wellPathCollection = rimView->wellPathsPartManager(); + cvf::Color3f color = computeContrastColor(); + RimWellPathCollection* wellPathCollection = rimView->wellPathsPartManager(); if (wellPathCollection) { - cvf::Color3f color = computeContrastColor(); - for (RimWellPath* path : wellPathCollection->wellPaths()) { - path->partMgr()->updateWellNameTextColor(color); + path->partMgr()->updateWellLabelTextColor(color); } } } diff --git a/ApplicationCode/UserInterface/RiuViewer.h b/ApplicationCode/UserInterface/RiuViewer.h index 15fce502a1..08a4d86757 100644 --- a/ApplicationCode/UserInterface/RiuViewer.h +++ b/ApplicationCode/UserInterface/RiuViewer.h @@ -78,6 +78,8 @@ public: void updateGridBoxData(); cvf::Model* gridBoxModel() const; + void updateAnnotationItems(); + void updateWellPathTextColor(); void showAnimationProgress(bool enable);