First odb file read and displayed

This commit is contained in:
Jacob Støren 2015-04-27 14:06:42 +02:00
parent 0f3d9ffa60
commit c0217a68a4
2 changed files with 8 additions and 2 deletions

View File

@ -247,9 +247,10 @@ void RimGeoMechView::createDisplayModelAndRedraw()
cvf::ref<cvf::Scene> scene = new cvf::Scene;
scene->addModel(cvfModel.p());
scene->updateBoundingBoxesRecursive();
m_viewer->setMainScene(scene.p());
m_viewer->zoomAll();
m_viewer->update();
}
RiuMainWindow::instance()->refreshAnimationActions();

View File

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