mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2094 Move annotation functions from updateGridBoxData to new function
This commit is contained in:
parent
93a83cd756
commit
de8b953360
@ -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())
|
||||
{
|
||||
|
@ -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,
|
||||
|
@ -715,6 +715,7 @@ void RimEclipseCase::reloadDataAndUpdate()
|
||||
CVF_ASSERT(reservoirView);
|
||||
reservoirView->loadDataAndUpdate();
|
||||
reservoirView->updateGridBoxData();
|
||||
reservoirView->updateAnnotationItems();
|
||||
}
|
||||
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -171,6 +171,7 @@ public:
|
||||
|
||||
public:
|
||||
void updateGridBoxData();
|
||||
void updateAnnotationItems();
|
||||
virtual RimCase* ownerCase() const = 0;
|
||||
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override { return &name; }
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -78,6 +78,8 @@ public:
|
||||
void updateGridBoxData();
|
||||
cvf::Model* gridBoxModel() const;
|
||||
|
||||
void updateAnnotationItems();
|
||||
|
||||
void updateWellPathTextColor();
|
||||
|
||||
void showAnimationProgress(bool enable);
|
||||
|
Loading…
Reference in New Issue
Block a user