mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#884 Intersection collection is responsible for adding box manipulator geometry to model used in 3D viewer
This commit is contained in:
@@ -96,10 +96,8 @@ RimIntersectionBox::RimIntersectionBox()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionBox::~RimIntersectionBox()
|
||||
{
|
||||
if (m_boxManipulator && viewer())
|
||||
if (m_boxManipulator)
|
||||
{
|
||||
viewer()->removeStaticModel(m_boxManipulator->model());
|
||||
|
||||
m_boxManipulator->deleteLater();
|
||||
}
|
||||
}
|
||||
@@ -144,6 +142,14 @@ void RimIntersectionBox::setFromOriginAndSize(const cvf::Vec3d& origin, const cv
|
||||
rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimIntersectionBox::show3dManipulator() const
|
||||
{
|
||||
return m_show3DManipulator;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -213,6 +219,17 @@ RivIntersectionBoxPartMgr* RimIntersectionBox::intersectionBoxPartMgr()
|
||||
return m_intersectionBoxPartMgr.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::appendManipulatorPartsToModel(cvf::ModelBasicList* model)
|
||||
{
|
||||
if (show3dManipulator() && m_boxManipulator)
|
||||
{
|
||||
m_boxManipulator->appendPartsToModel(model);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -269,11 +286,6 @@ void RimIntersectionBox::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
{
|
||||
if (m_boxManipulator)
|
||||
{
|
||||
if (viewer())
|
||||
{
|
||||
viewer()->removeStaticModel(m_boxManipulator->model());
|
||||
}
|
||||
|
||||
m_boxManipulator->deleteLater();
|
||||
m_boxManipulator = nullptr;
|
||||
}
|
||||
@@ -410,15 +422,10 @@ void RimIntersectionBox::initAfterRead()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionBox::slotScheduleRedraw()
|
||||
{
|
||||
if (viewer())
|
||||
{
|
||||
viewer()->addStaticModelOnce(m_boxManipulator->model());
|
||||
|
||||
RimView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType(rimView);
|
||||
RimView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType(rimView);
|
||||
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user