diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 1625807f5c..af94589423 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -247,9 +247,10 @@ void RimGeoMechView::createDisplayModelAndRedraw() cvf::ref scene = new cvf::Scene; scene->addModel(cvfModel.p()); + scene->updateBoundingBoxesRecursive(); m_viewer->setMainScene(scene.p()); - + m_viewer->zoomAll(); m_viewer->update(); } RiuMainWindow::instance()->refreshAnimationActions(); diff --git a/ApplicationCode/UserInterface/RiuViewer.cpp b/ApplicationCode/UserInterface/RiuViewer.cpp index dc6fd634ed..60dc664fa5 100644 --- a/ApplicationCode/UserInterface/RiuViewer.cpp +++ b/ApplicationCode/UserInterface/RiuViewer.cpp @@ -531,7 +531,12 @@ void RiuViewer::pickPointAndFace(int winPosX, int winPosY, cvf::Vec3d* localInte { CVF_ASSERT(hitItems.count() > 0); - double characteristicCellSize = m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize(); + double characteristicCellSize = 5.0; + if (m_reservoirView && m_reservoirView->eclipseCase()) + { + characteristicCellSize = m_reservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize(); + } + double pickDepthThresholdSquared = characteristicCellSize / 100.0; pickDepthThresholdSquared = pickDepthThresholdSquared * pickDepthThresholdSquared;