mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Batch: Fixed crash related to statistics calculations
This commit is contained in:
parent
8abfbd3730
commit
ff361b39ef
@ -271,22 +271,21 @@ void RimStatisticsCase::computeStatistics()
|
||||
|
||||
RimStatisticsCaseEvaluator stat(sourceCases, timeStepIndices, statisticsConfig, resultCase);
|
||||
stat.evaluateForResults(resultSpecification);
|
||||
|
||||
// Todo: Is this really the time and place to do the following ? JJS
|
||||
|
||||
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStatisticsCase::scheduleACTIVEGeometryRegenOnReservoirViews()
|
||||
{
|
||||
for (size_t i = 0; i < reservoirViews().size(); i++)
|
||||
{
|
||||
RimReservoirView* reservoirView = reservoirViews()[i];
|
||||
CVF_ASSERT(reservoirView);
|
||||
|
||||
reservoirView->scheduleGeometryRegen(RivReservoirViewPartMgr::ACTIVE);
|
||||
reservoirView->createDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
|
||||
this->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -462,6 +461,7 @@ void RimStatisticsCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
||||
else
|
||||
{
|
||||
computeStatistics();
|
||||
scheduleACTIVEGeometryRegenOnReservoirViews();
|
||||
updateConnectedEditorsAndReservoirViews();
|
||||
}
|
||||
m_calculateEditCommand = false;
|
||||
|
@ -53,6 +53,9 @@ public:
|
||||
bool hasComputedStatistics() const;
|
||||
void clearComputedStatistics();
|
||||
|
||||
void scheduleACTIVEGeometryRegenOnReservoirViews();
|
||||
void updateConnectedEditorsAndReservoirViews();
|
||||
|
||||
virtual bool openEclipseGridFile();
|
||||
|
||||
RimCaseCollection* parentStatisticsCaseCollection();
|
||||
@ -77,7 +80,6 @@ private:
|
||||
void updateSelectionSummaryLabel();
|
||||
void updatePercentileUiVisibility();
|
||||
|
||||
void updateConnectedEditorsAndReservoirViews();
|
||||
|
||||
void setWellResultsAndUpdateViews(const cvf::Collection<RigSingleWellResultsData>& sourceCaseWellResults);
|
||||
|
||||
@ -87,7 +89,6 @@ private:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
virtual void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute );
|
||||
|
||||
// Fields
|
||||
|
||||
caf::PdmField< caf::AppEnum< RimDefines::ResultCatType > > m_resultType;
|
||||
|
@ -964,10 +964,16 @@ void RimUiTreeView::slotComputeStatistics()
|
||||
|
||||
statisticsCase->computeStatistics();
|
||||
|
||||
statisticsCase->scheduleACTIVEGeometryRegenOnReservoirViews();
|
||||
statisticsCase->updateConnectedEditorsAndReservoirViews();
|
||||
|
||||
if (statisticsCase->reservoirViews.size() == 0)
|
||||
{
|
||||
slotAddView();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user