mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Performance: Avoid calling allSummaryCases
allSummaryCases() is potentially a heavy CPU call for large ensembles. Always show the curve calculator button.
This commit is contained in:
parent
f52acd9a64
commit
7d440a9c2f
@ -60,12 +60,7 @@ void RicShowSummaryCurveCalculatorFeature::hideCurveCalculatorDialog()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicShowSummaryCurveCalculatorFeature::isCommandEnabled()
|
bool RicShowSummaryCurveCalculatorFeature::isCommandEnabled()
|
||||||
{
|
{
|
||||||
RimProject* proj = RimProject::current();
|
return true;
|
||||||
if ( !proj ) return false;
|
|
||||||
|
|
||||||
const auto& allSumCases = proj->allSummaryCases();
|
|
||||||
|
|
||||||
return !allSumCases.empty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user