mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3444 Hide inactive targets from the 3D view.
Also: Fix crash from missing ray
This commit is contained in:
@@ -123,6 +123,7 @@ bool RicPointTangentManipulator::eventFilter(QObject *obj, QEvent* inputEvent)
|
|||||||
int translatedMousePosY = m_viewer->height() - mouseEvent->pos().y();
|
int translatedMousePosY = m_viewer->height() - mouseEvent->pos().y();
|
||||||
|
|
||||||
cvf::ref<cvf::Ray> ray = m_viewer->mainCamera()->rayFromWindowCoordinates(translatedMousePosX, translatedMousePosY);
|
cvf::ref<cvf::Ray> ray = m_viewer->mainCamera()->rayFromWindowCoordinates(translatedMousePosX, translatedMousePosY);
|
||||||
|
if (!ray.isNull())
|
||||||
{
|
{
|
||||||
m_partManager->updateManipulatorFromRay(ray.p());
|
m_partManager->updateManipulatorFromRay(ray.p());
|
||||||
|
|
||||||
@@ -778,7 +779,7 @@ void RicWellTarget3dEditor::configureAndUpdateUi(const QString& uiConfigName)
|
|||||||
{
|
{
|
||||||
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>(this->pdmObject());
|
RimWellPathTarget* target = dynamic_cast<RimWellPathTarget*>(this->pdmObject());
|
||||||
|
|
||||||
if ( !target)
|
if ( !target || !target->isEnabled())
|
||||||
{
|
{
|
||||||
m_cvfModel->removeAllParts();
|
m_cvfModel->removeAllParts();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user