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())
|
if (m_wellLabelPart.p())
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
|
|
||||||
size_t segmentIndexFromTriangleIndex(size_t triangleIndex);
|
size_t segmentIndexFromTriangleIndex(size_t triangleIndex);
|
||||||
|
|
||||||
void updateWellNameTextColor(cvf::Color3f color);
|
void updateWellLabelTextColor(cvf::Color3f color);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void appendFishboneSubsPartsToModel(cvf::ModelBasicList* model,
|
void appendFishboneSubsPartsToModel(cvf::ModelBasicList* model,
|
||||||
|
@ -715,6 +715,7 @@ void RimEclipseCase::reloadDataAndUpdate()
|
|||||||
CVF_ASSERT(reservoirView);
|
CVF_ASSERT(reservoirView);
|
||||||
reservoirView->loadDataAndUpdate();
|
reservoirView->loadDataAndUpdate();
|
||||||
reservoirView->updateGridBoxData();
|
reservoirView->updateGridBoxData();
|
||||||
|
reservoirView->updateAnnotationItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
RimProject* project = RiaApplication::instance()->project();
|
RimProject* project = RiaApplication::instance()->project();
|
||||||
|
@ -241,6 +241,7 @@ void RimView::updateViewWidgetAfterCreation()
|
|||||||
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
|
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
|
||||||
|
|
||||||
this->updateGridBoxData();
|
this->updateGridBoxData();
|
||||||
|
this->updateAnnotationItems();
|
||||||
this->createHighlightAndGridBoxDisplayModel();
|
this->createHighlightAndGridBoxDisplayModel();
|
||||||
|
|
||||||
m_viewer->update();
|
m_viewer->update();
|
||||||
@ -700,6 +701,7 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
|
|||||||
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
|
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
|
||||||
}
|
}
|
||||||
updateGridBoxData();
|
updateGridBoxData();
|
||||||
|
updateAnnotationItems();
|
||||||
}
|
}
|
||||||
else if (changedField == &maximumFrameRate)
|
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:
|
public:
|
||||||
void updateGridBoxData();
|
void updateGridBoxData();
|
||||||
|
void updateAnnotationItems();
|
||||||
virtual RimCase* ownerCase() const = 0;
|
virtual RimCase* ownerCase() const = 0;
|
||||||
|
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField() override { return &name; }
|
virtual caf::PdmFieldHandle* userDescriptionField() override { return &name; }
|
||||||
|
@ -62,6 +62,8 @@
|
|||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
#include "RivWellPathPartMgr.h"
|
#include "RivWellPathPartMgr.h"
|
||||||
|
#include "RimSimWellInViewCollection.h"
|
||||||
|
#include "RimEclipseView.h"
|
||||||
|
|
||||||
using cvf::ManipulatorTrackball;
|
using cvf::ManipulatorTrackball;
|
||||||
|
|
||||||
@ -766,13 +768,19 @@ void RiuViewer::updateGridBoxData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_gridBoxGenerator->createGridBoxParts();
|
m_gridBoxGenerator->createGridBoxParts();
|
||||||
|
|
||||||
updateTextAndTickMarkColorForOverlayItems();
|
|
||||||
|
|
||||||
updateWellPathTextColor();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuViewer::updateAnnotationItems()
|
||||||
|
{
|
||||||
|
updateTextAndTickMarkColorForOverlayItems();
|
||||||
|
|
||||||
|
updateWellPathTextColor();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -789,15 +797,14 @@ void RiuViewer::updateWellPathTextColor()
|
|||||||
RimView* rimView = ownerReservoirView();
|
RimView* rimView = ownerReservoirView();
|
||||||
if (!rimView) return;
|
if (!rimView) return;
|
||||||
|
|
||||||
RimWellPathCollection* wellPathCollection = rimView->wellPathsPartManager();
|
cvf::Color3f color = computeContrastColor();
|
||||||
|
|
||||||
|
RimWellPathCollection* wellPathCollection = rimView->wellPathsPartManager();
|
||||||
if (wellPathCollection)
|
if (wellPathCollection)
|
||||||
{
|
{
|
||||||
cvf::Color3f color = computeContrastColor();
|
|
||||||
|
|
||||||
for (RimWellPath* path : wellPathCollection->wellPaths())
|
for (RimWellPath* path : wellPathCollection->wellPaths())
|
||||||
{
|
{
|
||||||
path->partMgr()->updateWellNameTextColor(color);
|
path->partMgr()->updateWellLabelTextColor(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,8 @@ public:
|
|||||||
void updateGridBoxData();
|
void updateGridBoxData();
|
||||||
cvf::Model* gridBoxModel() const;
|
cvf::Model* gridBoxModel() const;
|
||||||
|
|
||||||
|
void updateAnnotationItems();
|
||||||
|
|
||||||
void updateWellPathTextColor();
|
void updateWellPathTextColor();
|
||||||
|
|
||||||
void showAnimationProgress(bool enable);
|
void showAnimationProgress(bool enable);
|
||||||
|
Loading…
Reference in New Issue
Block a user