GeoMech results loaded before animation setup

Now Geomech projects seems to open fine.
This commit is contained in:
Jacob Støren 2015-05-16 09:12:43 +02:00
parent 9596f6c0a4
commit d38aae29b6
2 changed files with 12 additions and 1 deletions

View File

@ -42,6 +42,7 @@ public:
virtual ~RimGeoMechCase(void);
void setFileName(const QString& fileName) {m_caseFileName = fileName;}
QString caseFileName() const {return m_caseFileName();}
bool openGeoMechCase();
RigGeoMechCaseData* geoMechData() { return m_geoMechCaseData.p(); }

View File

@ -110,10 +110,20 @@ void RimGeoMechView::loadDataAndUpdate()
if (m_geomechCase)
{
m_geomechCase->openGeoMechCase();
if (!m_geomechCase->openGeoMechCase())
{
QMessageBox::warning(RiuMainWindow::instance(),
"Error when opening project file",
"Could not open the Odb file: \n"+ m_geomechCase->caseFileName());
m_geomechCase = NULL;
return;
}
m_geoMechFullModel->clearAndSetReservoir(m_geomechCase->geoMechData(), this);
}
CVF_ASSERT(this->cellResult() != NULL);
m_geomechCase->geoMechData()->assertResultsLoaded(0, this->cellResult()->resultAddress());
updateViewerWidget();
createDisplayModelAndRedraw();