#2094 Move annotation functions from updateGridBoxData to new function

This commit is contained in:
Rebecca Cox 2017-11-08 09:02:21 +01:00
parent 93a83cd756
commit de8b953360
7 changed files with 34 additions and 10 deletions

View File

@ -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())
{

View File

@ -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,

View File

@ -715,6 +715,7 @@ void RimEclipseCase::reloadDataAndUpdate()
CVF_ASSERT(reservoirView);
reservoirView->loadDataAndUpdate();
reservoirView->updateGridBoxData();
reservoirView->updateAnnotationItems();
}
RimProject* project = RiaApplication::instance()->project();

View File

@ -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();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -171,6 +171,7 @@ public:
public:
void updateGridBoxData();
void updateAnnotationItems();
virtual RimCase* ownerCase() const = 0;
virtual caf::PdmFieldHandle* userDescriptionField() override { return &name; }

View File

@ -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);
}
}
}

View File

@ -78,6 +78,8 @@ public:
void updateGridBoxData();
cvf::Model* gridBoxModel() const;
void updateAnnotationItems();
void updateWellPathTextColor();
void showAnimationProgress(bool enable);